Skip to content

Commit 15afec1

Browse files
authored
ci(cubesql): Run unit tests for both top-down and bottom-up extractors (#8884)
Also remove duplicated test_wrapper_limit_zero This case is already covered with compile::test::test_wrapper::test_wrapper_limit_zero
1 parent 276ee09 commit 15afec1

File tree

2 files changed

+6
-32
lines changed

2 files changed

+6
-32
lines changed

.github/workflows/rust-cubesql.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ jobs:
6262
# We use host instead of cross container, because it's much faster
6363
runs-on: ubuntu-24.04
6464
timeout-minutes: 60
65-
name: Unit (Rewrite Engine)
65+
name: Unit (Rewrite Engine) (CUBESQL_TOP_DOWN_EXTRACTOR=${{ matrix.top-down-extractor }})
66+
strategy:
67+
matrix:
68+
top-down-extractor: ['true', 'false']
69+
fail-fast: false
6670

6771
steps:
6872
- name: Checkout
@@ -90,6 +94,7 @@ jobs:
9094
CUBESQL_TESTING_CUBE_TOKEN: ${{ secrets.CUBESQL_TESTING_CUBE_TOKEN }}
9195
CUBESQL_TESTING_CUBE_URL: ${{ secrets.CUBESQL_TESTING_CUBE_URL }}
9296
CUBESQL_SQL_PUSH_DOWN: true
97+
CUBESQL_TOP_DOWN_EXTRACTOR: ${{ matrix.top-down-extractor }}
9398
CUBESQL_REWRITE_CACHE: true
9499
CUBESQL_REWRITE_TIMEOUT: 60
95100
run: |

rust/cubesql/cubesql/src/compile/mod.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16220,35 +16220,4 @@ LIMIT {{ limit }}{% endif %}"#.to_string(),
1622016220

1622116221
Ok(())
1622216222
}
16223-
16224-
#[tokio::test]
16225-
async fn test_wrapper_limit_zero() {
16226-
if !Rewriter::sql_push_down_enabled() {
16227-
return;
16228-
}
16229-
init_testing_logger();
16230-
16231-
let query_plan = convert_select_to_query_plan(
16232-
r#"
16233-
SELECT MAX(order_date) FROM KibanaSampleDataEcommerce LIMIT 0
16234-
"#
16235-
.to_string(),
16236-
DatabaseProtocol::PostgreSQL,
16237-
)
16238-
.await;
16239-
16240-
let logical_plan = query_plan.as_logical_plan();
16241-
let sql = logical_plan
16242-
.find_cube_scan_wrapper()
16243-
.wrapped_sql
16244-
.unwrap()
16245-
.sql;
16246-
assert!(sql.contains("LIMIT 0"));
16247-
16248-
let physical_plan = query_plan.as_physical_plan().await.unwrap();
16249-
println!(
16250-
"Physical plan: {}",
16251-
displayable(physical_plan.as_ref()).indent()
16252-
);
16253-
}
1625416223
}

0 commit comments

Comments
 (0)