Skip to content

Commit cd1c983

Browse files
MazterQyouKSDaemon
andauthored
fix(cubesql): Fix sort push down projection on complex expressions (cube-js#9787)
* fix(cubesql): Fix sort push down projection on complex expressions Signed-off-by: Alex Qyoun-ae <[email protected]> * temp switch to macos14 for gh ci runner --------- Signed-off-by: Alex Qyoun-ae <[email protected]> Co-authored-by: Konstantin Burkalev <[email protected]>
1 parent 1f8620d commit cd1c983

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/workflows/rust-cubesql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ jobs:
232232
matrix:
233233
# We do not need to test under all versions, we do it under linux
234234
node-version: [22.x]
235-
os-version: ["macos-13"]
235+
os-version: ["macos-14"]
236236
target: ["x86_64-apple-darwin", "aarch64-apple-darwin"]
237237
include:
238238
- target: x86_64-apple-darwin
@@ -308,8 +308,8 @@ jobs:
308308
CARGO_BUILD_TARGET: ${{ matrix.target }}
309309
run: cd packages/cubejs-backend-native && yarn run native:build-debug-python
310310
- name: Tests
311-
# We cannot test arm64 on x64
312-
if: (matrix.target == 'x86_64-apple-darwin')
311+
# We cannot test x64 on arm64
312+
if: (matrix.target == 'aarch64-apple-darwin')
313313
env:
314314
CUBESQL_STREAM_MODE: true
315315
CUBEJS_NATIVE_INTERNAL_DEBUG: true

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)