Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions controller/src/intent_algebra/legacy_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,31 @@ pub enum FilterVal {
/// Every variant is a *node* in the logical query plan tree. Leaves are
/// [`QueryExpr::Source`] or [`QueryExpr::Ref`]. Interior nodes combine their
/// `input` child(ren) through the operator they implement.
///
/// # Migration status (legacy_expr migration, Batch 2)
///
/// The ten "A-classified" variants — `Filter`, `Project`, `Partition`,
/// `Distinct`, `Merge`, `Join`, `SetOp`, `Sort`, `Limit`, `BinaryOp` —
/// have canonical structural twins in
/// [`crate::intent_algebra::query_expr::QueryExpr`]. The canonical spelling
/// uses `child:` where these legacy variants use `input:`; the typed
/// [`crate::intent_algebra::Predicate`] replaces [`ScalarExpr`] in `Filter`
/// / `Join` / `Aggregate::having` (translation via
/// [`crate::intent_algebra::from_legacy_scalar`] for the four supported
/// scalar shapes).
///
/// These legacy variants stay here for now because:
/// 1. [`legacy_lower`] (Batch 13's target) reshape paths still construct
/// them internally.
/// 2. The legacy [`ScalarExpr`] retains four E-deferred variants
/// (`FunctionCall`, `ScalarSubquery`, `InList`, `Between`) that the
/// canonical `Predicate` doesn't cover yet — deleting the legacy
/// `Filter` would lose `ScalarExpr` expressiveness from consumers
/// that haven't migrated.
///
/// Consumer-side redirect (legacy → canonical, with `input:` → `child:` and
/// `ScalarExpr` → `Predicate`) lands in subsequent batches once Batch 2's
/// additive lift is in place.
#[derive(Debug, Clone)]
pub enum QueryExpr {
// ── Base relations ────────────────────────────────────────────────────
Expand Down
5 changes: 4 additions & 1 deletion controller/src/intent_algebra/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ pub use agg_intent::AggIntent;
pub use cse::{dedupe_subtrees, CseWorkloadPlan};
pub use lower::{lower_parsed_query, LoweringError};
pub use query_expr::{
BindingScope, HavingPredicate, LabelFilter, QueryExpr, QueryExprError, Source, WindowKind,
from_legacy_scalar, BinaryOpKind, BindingScope, ColumnRef, GroupSide, HavingPredicate,
JoinKind, LabelFilter, LiteralValue, PartitionKeys, Predicate, ProjectItem, QueryExpr,
QueryExprError, SetOpKind, SortKey, Source, VectorGrouping, VectorMatch, VectorMatchKind,
WindowKind,
};
pub use schema::{cse_reuse_is_legal, Column, ColumnId, CseError, DataType, Schema};
Loading