diff --git a/.github/workflows/drivers-tests.yml b/.github/workflows/drivers-tests.yml index 56ccaacaad269..c9df773f44cb5 100644 --- a/.github/workflows/drivers-tests.yml +++ b/.github/workflows/drivers-tests.yml @@ -68,9 +68,6 @@ on: - 'true' - 'false' -env: - USE_TESSERACT_SQL_PLANNER: false - jobs: latest-tag-sha: runs-on: ubuntu-24.04 @@ -268,6 +265,12 @@ jobs: - snowflake-export-bucket-azure-via-storage-integration - snowflake-export-bucket-gcs - snowflake-export-bucket-gcs-prefix + use_tesseract_sql_planner: [ false ] + include: + - database: postgres + use_tesseract_sql_planner: true + - database: bigquery-export-bucket-gcs + use_tesseract_sql_planner: true fail-fast: false steps: @@ -334,7 +337,7 @@ jobs: (contains(env.CLOUD_DATABASES, matrix.database) && env.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY != '') || (!contains(env.CLOUD_DATABASES, matrix.database)) env: - DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.use_tesseract_sql_planner || env.USE_TESSERACT_SQL_PLANNER }} + DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.use_tesseract_sql_planner) || matrix.use_tesseract_sql_planner }} # Athena DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY: ${{ secrets.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1b25207fd35e0..482f355a66a6e 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -416,6 +416,11 @@ jobs: 'clickhouse', 'druid', 'elasticsearch', 'mssql', 'mysql', 'postgres', 'prestodb', 'mysql-aurora-serverless', 'crate', 'mongobi', 'firebolt', 'dremio', 'vertica' ] + use_tesseract_sql_planner: [ false ] + include: + - db: postgres + node-version: 22.x + use_tesseract_sql_planner: true fail-fast: false steps: @@ -481,6 +486,8 @@ jobs: (contains(env.CLOUD_DATABASES, matrix.db) && env.DRIVERS_TESTS_ATHENA_CUBEJS_AWS_KEY != '') || (!contains(env.CLOUD_DATABASES, matrix.db)) env: + CUBEJS_TESSERACT_SQL_PLANNER: ${{ matrix.use_tesseract_sql_planner }} + # Firebolt Integration DRIVERS_TESTS_FIREBOLT_CUBEJS_FIREBOLT_ENGINE_NAME: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_FIREBOLT_ENGINE_NAME }} DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_NAME: ${{ secrets.DRIVERS_TESTS_FIREBOLT_CUBEJS_DB_NAME }} diff --git a/packages/cubejs-testing-drivers/fixtures/bigquery.json b/packages/cubejs-testing-drivers/fixtures/bigquery.json index 1f5edc1b40715..d6ac59230e6f6 100644 --- a/packages/cubejs-testing-drivers/fixtures/bigquery.json +++ b/packages/cubejs-testing-drivers/fixtures/bigquery.json @@ -172,5 +172,24 @@ "SQL API: Rollup with aliases", "SQL API: Nested Rollup over asterisk", "SQL API: Extended nested Rollup over asterisk" + ], + "tesseractSkip": [ + "querying Products: dimensions -- doesn't work wo ordering", + "querying ECommerce: total quantity, avg discount, total sales, total profit by product + order + total -- rounding in athena", + "querying ECommerce: total sales, total profit by month + order (date) + total -- doesn't work with the BigQuery", + "querying ECommerce: total quantity, avg discount, total sales, total profit by product + order + total -- noisy test", + "pre-aggregations Customers: running total without time dimension", + "querying BigECommerce: null boolean", + "querying BigECommerce: rolling count_distinct_approx window by 2 day", + "querying BigECommerce: rolling count_distinct_approx window by 2 week", + "querying BigECommerce: rolling count_distinct_approx window by 2 month", + "querying BigECommerce: totalProfitYearAgo", + "SQL API: post-aggregate percentage of total", + "SQL API: Simple Rollup", + "SQL API: Rollup over exprs", + "SQL API: Nested Rollup", + "SQL API: Nested Rollup with aliases", + "SQL API: Timeshift measure from cube", + "SQL API: SQL push down push to cube quoted alias" ] } diff --git a/packages/cubejs-testing-drivers/fixtures/postgres.json b/packages/cubejs-testing-drivers/fixtures/postgres.json index 94ad1dd94428e..b02f8905adaf4 100644 --- a/packages/cubejs-testing-drivers/fixtures/postgres.json +++ b/packages/cubejs-testing-drivers/fixtures/postgres.json @@ -162,5 +162,23 @@ "querying BigECommerce: rolling window by 2 day without date range", "querying BigECommerce: rolling window by 2 month without date range", "querying BigECommerce: rolling window YTD without date range" + ], + "tesseractSkip": [ + "querying Products: dimensions -- doesn't work wo ordering", + "querying ECommerce: total quantity, avg discount, total sales, total profit by product + order + total -- rounding in athena", + "querying ECommerce: total quantity, avg discount, total sales, total profit by product + order + total -- noisy test", + "pre-aggregations Customers: running total without time dimension", + "querying BigECommerce: totalProfitYearAgo", + "SQL API: post-aggregate percentage of total", + "SQL API: Simple Rollup", + "SQL API: Complex Rollup", + "SQL API: Rollup with aliases", + "SQL API: Rollup over exprs", + "SQL API: Nested Rollup", + "SQL API: Nested Rollup with aliases", + "SQL API: Nested Rollup over asterisk", + "SQL API: Extended nested Rollup over asterisk", + "SQL API: Timeshift measure from cube", + "SQL API: SQL push down push to cube quoted alias" ] } diff --git a/packages/cubejs-testing-drivers/src/tests/testQueries.ts b/packages/cubejs-testing-drivers/src/tests/testQueries.ts index e4d52b55f04ab..ebabdb06472a6 100644 --- a/packages/cubejs-testing-drivers/src/tests/testQueries.ts +++ b/packages/cubejs-testing-drivers/src/tests/testQueries.ts @@ -26,6 +26,8 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten describe(`Queries with the @cubejs-backend/${type}-driver${extendedEnv ? ` ${extendedEnv}` : ''}`, () => { jest.setTimeout(60 * 5 * 1000); + const isTesseractEnv = process.env.DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER && process.env.DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER.toLowerCase() === 'true'; + const fixtures = getFixtures(type, extendedEnv); let client: CubeApi; let driver: BaseDriver; @@ -65,7 +67,9 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten } function execute(name: string, test: () => Promise) { - if (fixtures.skip && fixtures.skip.indexOf(name) >= 0) { + if (!isTesseractEnv && fixtures.skip && fixtures.skip.indexOf(name) >= 0) { + it.skip(name, test); + } else if (isTesseractEnv && fixtures.tesseractSkip && fixtures.tesseractSkip.indexOf(name) >= 0) { it.skip(name, test); } else { it(name, test); diff --git a/packages/cubejs-testing-drivers/src/types/Fixture.ts b/packages/cubejs-testing-drivers/src/types/Fixture.ts index 3ba986183ef1b..f85b5304cb396 100644 --- a/packages/cubejs-testing-drivers/src/types/Fixture.ts +++ b/packages/cubejs-testing-drivers/src/types/Fixture.ts @@ -31,4 +31,5 @@ export type Fixture = { [cube: string]: [{ name: string, [prop: string]: unknown }], }, skip?: string[], + tesseractSkip?: string[], };