Skip to content

Commit

Permalink
add better descriptions of logical operator fields
Browse files Browse the repository at this point in the history
  • Loading branch information
connortsui20 committed Jan 30, 2025
1 parent 06b0141 commit 94f54e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions optd-core/src/operator/relational/logical/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ pub struct Filter<Relation, Scalar> {
/// The input relation.
pub child: Relation,
/// The filter expression denoting the predicate condition for this filter operation.
///
/// For example, a filter predicate could be `column_a > 42`, or it could be something like
/// `column_b < 100 AND column_c > 1000`.
pub predicate: Scalar,
}
2 changes: 2 additions & 0 deletions optd-core/src/operator/relational/logical/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ pub struct Join<Relation, Scalar> {
/// The right input relation.
pub right: Relation,
/// The join expression denoting the join condition that links the two input relations.
///
/// For example, a join operation could have a condition on `t1.id = t2.id` (an equijoin).
pub condition: Scalar,
}
3 changes: 3 additions & 0 deletions optd-core/src/operator/relational/logical/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ pub struct Scan<Scalar> {
/// TODO(alexis) Mocked for now.
pub table_name: String,
/// An optional filter expression for predicate pushdown into scan operators.
///
/// For example, a `Filter(Scan(A), column_a < 42)` can be converted into a predicate pushdown
/// `Scan(A, column < 42)` to prevent having to materialize many tuples.
pub predicate: Option<Scalar>,
}

0 comments on commit 94f54e6

Please sign in to comment.