Skip to content

Commit

Permalink
Add more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sicheng Pan authored and Sicheng-Pan committed Sep 30, 2024
1 parent 0709de3 commit 57505da
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions rust/types/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,13 @@ Metadata queries
===========================================
*/

/// This `Where` enum serves as an unified representation for the `where` and `where_document` clauses.
/// Although this is not unified in the API level due to legacy design choices, in the future we will be
/// unifying them together, and the structure of the unified AST should be identical to the one here.
/// Currently both `where` and `where_document` clauses will be translated into `Where`, and if both are
/// present we simply create a conjunction of both clauses as the actual filter. This is consistent with
/// the semantics we used to have when the `where` and `where_document` clauses are treated seperately.
/// TODO: Remove this note once the `where` clause and `where_document` clause is unified in the API level.
#[derive(Clone, Debug, PartialEq)]
pub enum Where {
DirectWhereComparison(DirectWhereComparison),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ impl Operator<HydrateMetadataResultsOperatorInput, HydrateMetadataResultsOperato
HydrateMetadataResultsOperatorError::LogMaterialization(e)
})?;

// A hash map that map an offset id to the corresponding log
// Create a hash map that maps an offset id to the corresponding log
// It contains all records from the logs that should be present in the final result
let oid_to_log_record: HashMap<_, _> = mat_records
.iter()
.flat_map(|(log, _)| {
Expand Down
2 changes: 1 addition & 1 deletion rust/worker/src/execution/operators/metadata_filtering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ impl Operator<MetadataFilteringInput, MetadataFilteringOutput> for MetadataFilte
Include(rbm) => rbm,
Exclude(rbm) => {
if let Some(reader) = record_segment_reader.as_ref() {
// TODO: Optimize offset limit performance
// TODO: Optimize for offset limit performance
reader
.get_all_offset_ids()
.await
Expand Down

0 comments on commit 57505da

Please sign in to comment.