Skip to content

Commit cea93d6

Browse files
committed
fix(cubesql): Fix sort push down projection on complex expressions
Signed-off-by: Alex Qyoun-ae <[email protected]>
1 parent 18e4c40 commit cea93d6

File tree

1 file changed

+8
-1
lines changed
  • rust/cubesql/cubesql/src/compile/rewrite/rules

1 file changed

+8
-1
lines changed

rust/cubesql/cubesql/src/compile/rewrite/rules/order.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use egg::Subst;
77

88
use crate::{
99
compile::{
10-
datafusion::logical_plan::Column,
10+
datafusion::logical_plan::{Column, Expr},
1111
rewrite::{
1212
analysis::OriginalExpr,
1313
column_expr, column_name_to_member_vec,
@@ -370,6 +370,13 @@ impl OrderRules {
370370
continue;
371371
};
372372

373+
// TODO: workaround the issue with `generate_sql_for_push_to_cube`
374+
// accepting only columns and erroring on more complex expressions.
375+
// Remove this when `generate_sql_for_push_to_cube` is fixed.
376+
if !matches!(expr, Expr::Column(_)) {
377+
continue;
378+
}
379+
373380
let Ok(new_expr_id) =
374381
LogicalPlanToLanguageConverter::add_expr(egraph, expr, flat_list)
375382
else {

0 commit comments

Comments
 (0)