Skip to content

Commit

Permalink
chore: add docs
Browse files Browse the repository at this point in the history
Signed-off-by: Zhenchi <[email protected]>
  • Loading branch information
zhongzc committed Dec 28, 2023
1 parent ff2de5b commit 55fc1f9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/mito2/src/sst/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#![allow(dead_code)]

pub mod applier;
mod codec;
11 changes: 9 additions & 2 deletions src/mito2/src/sst/index/applier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,22 @@ use std::sync::Arc;
use index::inverted_index::search::index_apply::IndexApplier;
use object_store::ObjectStore;

#[allow(dead_code)]
#[derive(Clone)]
/// The [`SstIndexApplier`] is responsible for applying predicates to the provided SST files
/// and returning the relevant row group ids for further scan.
pub struct SstIndexApplier {
/// The root directory of the region.
region_dir: String,

/// Object store responsible for accessing SST files.
object_store: ObjectStore,

/// Predifined index applier used to apply predicates to index files

Check warning on line 31 in src/mito2/src/sst/index/applier.rs

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

"Predifined" should be "Predefined".
/// and return the relevant row group ids for further scan.
index_applier: Arc<dyn IndexApplier>,
}

impl SstIndexApplier {
/// Creates a new [`SstIndexApplier`].
pub fn new(
region_dir: String,
object_store: ObjectStore,
Expand Down
2 changes: 0 additions & 2 deletions src/mito2/src/sst/index/applier/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ pub struct SstIndexApplierBuilder<'a> {

impl<'a> SstIndexApplierBuilder<'a> {
/// Creates a new [`SstIndexApplierBuilder`].
#[allow(dead_code)]
pub fn new(
region_dir: String,
object_store: ObjectStore,
Expand All @@ -76,7 +75,6 @@ impl<'a> SstIndexApplierBuilder<'a> {

/// Consumes the builder to construct an [`SstIndexApplier`], optionally returned based on
/// the expressions provided. If no predicates match, returns `None`.
#[allow(dead_code)]
pub fn build(mut self, exprs: &[Expr]) -> Result<Option<SstIndexApplier>> {
for expr in exprs {
self.traverse_and_collect(expr.df_expr())?;
Expand Down

0 comments on commit 55fc1f9

Please sign in to comment.