diff --git a/.github/workflows/rust-cubesql.yml b/.github/workflows/rust-cubesql.yml index 993a39446ad36..74741e466a7e9 100644 --- a/.github/workflows/rust-cubesql.yml +++ b/.github/workflows/rust-cubesql.yml @@ -62,7 +62,11 @@ jobs: # We use host instead of cross container, because it's much faster runs-on: ubuntu-24.04 timeout-minutes: 60 - name: Unit (Rewrite Engine) + name: Unit (Rewrite Engine) (CUBESQL_TOP_DOWN_EXTRACTOR=${{ matrix.top-down-extractor }}) + strategy: + matrix: + top-down-extractor: ['true', 'false'] + fail-fast: false steps: - name: Checkout @@ -90,6 +94,7 @@ jobs: CUBESQL_TESTING_CUBE_TOKEN: ${{ secrets.CUBESQL_TESTING_CUBE_TOKEN }} CUBESQL_TESTING_CUBE_URL: ${{ secrets.CUBESQL_TESTING_CUBE_URL }} CUBESQL_SQL_PUSH_DOWN: true + CUBESQL_TOP_DOWN_EXTRACTOR: ${{ matrix.top-down-extractor }} CUBESQL_REWRITE_CACHE: true CUBESQL_REWRITE_TIMEOUT: 60 run: | diff --git a/rust/cubesql/cubesql/src/compile/mod.rs b/rust/cubesql/cubesql/src/compile/mod.rs index 6f6ee121d3a14..ca304115cb2ea 100644 --- a/rust/cubesql/cubesql/src/compile/mod.rs +++ b/rust/cubesql/cubesql/src/compile/mod.rs @@ -16220,35 +16220,4 @@ LIMIT {{ limit }}{% endif %}"#.to_string(), Ok(()) } - - #[tokio::test] - async fn test_wrapper_limit_zero() { - if !Rewriter::sql_push_down_enabled() { - return; - } - init_testing_logger(); - - let query_plan = convert_select_to_query_plan( - r#" - SELECT MAX(order_date) FROM KibanaSampleDataEcommerce LIMIT 0 - "# - .to_string(), - DatabaseProtocol::PostgreSQL, - ) - .await; - - let logical_plan = query_plan.as_logical_plan(); - let sql = logical_plan - .find_cube_scan_wrapper() - .wrapped_sql - .unwrap() - .sql; - assert!(sql.contains("LIMIT 0")); - - let physical_plan = query_plan.as_physical_plan().await.unwrap(); - println!( - "Physical plan: {}", - displayable(physical_plan.as_ref()).indent() - ); - } }