You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most implementations simply forward requests to datafusion. Since we are highly coupled with datafusion and have no plan to support another query engine, we could remove these types.
/// Represent logical expressions such as `A + 1`, or `CAST(c1 AS int)`.
#[derive(Clone,PartialEq,Eq,Hash,Debug)]
pubstructExpr{
df_expr:DfExpr,
}
We could simply remove the Expr and re-export datafusion's Expr
pubuse datafusion_expr::expr::Expr;
The LogicalPlan only has one variant so we can replace it with datafusion's LogicalPlan. But we also need to refactor methods of the enum so they can take datafusion's LogicalPlan as input.
evenyag
changed the title
Remove unnecessary traits and wrapper types for the query engine
Remove unnecessary traits and wrapper types from the query crate
May 8, 2024
What type of enhancement is this?
Refactor
What does the enhancement do?
We defined some wrapper types and traits for the query engine
Most implementations simply forward requests to datafusion. Since we are highly coupled with datafusion and have no plan to support another query engine, we could remove these types.
Implementation challenges
For
Expr
:greptimedb/src/common/query/src/logical_plan/expr.rs
Lines 22 to 27 in d997463
We could simply remove the
Expr
and re-export datafusion'sExpr
The
LogicalPlan
only has one variant so we can replace it with datafusion'sLogicalPlan
. But we also need to refactor methods of the enum so they can take datafusion'sLogicalPlan
as input.greptimedb/src/query/src/plan.rs
Lines 35 to 38 in d997463
We could also remove adapters like the
DfPhysicalPlanAdapter
if we remove thePhysicalPlan
.Many places use
Expr
,LogicalPlan
, andPhysicalPlan
. We might need to refactor them in different PRs.The text was updated successfully, but these errors were encountered: