From 34cd50cc4840d72636f5d33c196ba3e0fcb8a7db Mon Sep 17 00:00:00 2001 From: Bikash Date: Wed, 19 Aug 2026 02:21:54 +0530 Subject: [PATCH 1/3] test(chart): mock the event log endpoint in the drill-to-detail menu test (#43183) Co-authored-by: bikashJMV Co-authored-by: Claude Opus 5 (1M context) Co-authored-by: Joe Li --- .../useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx b/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx index 8338d3e6bd3a..bbd7db3fa609 100644 --- a/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx +++ b/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx @@ -17,6 +17,7 @@ * under the License. */ import { useState } from 'react'; +import fetchMock from 'fetch-mock'; import { cleanup, render, @@ -35,6 +36,10 @@ import { useDrillDetailMenuItems, DrillDetailMenuItemsProps } from './index'; /* eslint jest/expect-expect: ["warn", { "assertFunctionNames": ["expect*"] }] */ +// Opening the context menu logs an event, and an unmatched request makes +// fetch-mock throw inside the component. +fetchMock.post('glob:*/log/?*', {}); + jest.mock( '../DrillDetail/DrillDetailPane', () => From 5ce52e531dcb60f7c995ac7f4b74ff219b4b51ca Mon Sep 17 00:00:00 2001 From: David Dallakyan <131261521+daviddallakyan2005@users.noreply.github.com> Date: Wed, 19 Aug 2026 02:49:18 +0400 Subject: [PATCH 2/3] fix(clickhouse): add PT1S time grain (#43217) --- superset/db_engine_specs/README.md | 8 ++++---- superset/db_engine_specs/clickhouse.py | 1 + .../unit_tests/db_engine_specs/test_clickhouse.py | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/superset/db_engine_specs/README.md b/superset/db_engine_specs/README.md index d944af21d66a..b8769cc8afeb 100644 --- a/superset/db_engine_specs/README.md +++ b/superset/db_engine_specs/README.md @@ -83,7 +83,7 @@ The tables below (generated via `python superset/db_engine_specs/lib.py`) summar | Databricks (legacy) | 70 | Supported | Partial | Supported | Partial | Partial | Not supported | | StarRocks | 69 | Supported | Partial | Supported | Partial | Partial | Partial | | SingleStore | 68 | Supported | Partial | Supported | Not supported | Partial | Not supported | -| ClickHouse Connect (Superset) | 61 | Supported | Partial | Partial | Partial | Partial | Not supported | +| ClickHouse Connect (Superset) | 62 | Supported | Partial | Supported | Partial | Partial | Not supported | | Google Sheets | 61 | Supported | Partial | Supported | Supported | Partial | Partial | | Aurora MySQL (Data API) | 59 | Supported | Partial | Supported | Partial | Partial | Not supported | | MariaDB | 59 | Supported | Partial | Supported | Partial | Partial | Not supported | @@ -91,7 +91,7 @@ The tables below (generated via `python superset/db_engine_specs/lib.py`) summar | OceanBase | 59 | Supported | Partial | Supported | Partial | Partial | Not supported | | MotherDuck | 58 | Supported | Partial | Supported | Not supported | Partial | Not supported | | KustoSQL | 54 | Supported | Partial | Supported | Partial | Partial | Not supported | -| ClickHouse | 51 | Supported | Partial | Partial | Partial | Partial | Not supported | +| ClickHouse | 52 | Supported | Partial | Supported | Partial | Partial | Not supported | | Databend | 51 | Supported | Partial | Supported | Partial | Partial | Not supported | | Apache Drill | 50 | Supported | Partial | Supported | Partial | Partial | Partial | | Apache Druid | 47 | Partial | Partial | Supported | Partial | Partial | Not supported | @@ -293,8 +293,8 @@ The tables below (generated via `python superset/db_engine_specs/lib.py`) summar | Aurora MySQL (Data API) | True | True | True | True | True | True | True | True | | Aurora PostgreSQL (Data API) | True | True | True | True | True | True | True | True | | Azure Synapse | True | True | True | True | True | True | True | True | -| ClickHouse | False | True | True | True | True | True | True | True | -| ClickHouse Connect (Superset) | False | True | True | True | True | True | True | True | +| ClickHouse | True | True | True | True | True | True | True | True | +| ClickHouse Connect (Superset) | True | True | True | True | True | True | True | True | | CockroachDB | True | True | True | True | True | True | True | True | | Couchbase | True | True | True | True | False | True | True | True | | CrateDB | True | True | True | True | True | True | True | True | diff --git a/superset/db_engine_specs/clickhouse.py b/superset/db_engine_specs/clickhouse.py index 64b65d4fdcb6..41a7a27649c6 100644 --- a/superset/db_engine_specs/clickhouse.py +++ b/superset/db_engine_specs/clickhouse.py @@ -112,6 +112,7 @@ def is_read_limit_error(cls, ex: Exception) -> bool: _time_grain_expressions = { None: "{col}", + "PT1S": "toStartOfSecond(toDateTime64({col}, 3))", "PT1M": "toStartOfMinute(toDateTime({col}))", "PT5M": "toDateTime(intDiv(toUInt32(toDateTime({col})), 300)*300)", "PT10M": "toDateTime(intDiv(toUInt32(toDateTime({col})), 600)*600)", diff --git a/tests/unit_tests/db_engine_specs/test_clickhouse.py b/tests/unit_tests/db_engine_specs/test_clickhouse.py index fc7f8a5515a9..94e90327adce 100644 --- a/tests/unit_tests/db_engine_specs/test_clickhouse.py +++ b/tests/unit_tests/db_engine_specs/test_clickhouse.py @@ -62,6 +62,20 @@ def test_convert_dttm( assert_convert_dttm(spec, target_type, expected_result, dttm) +@pytest.mark.parametrize( + "time_grain,expected", + [ + (None, "{col}"), + ("PT1S", "toStartOfSecond(toDateTime64({col}, 3))"), + ("PT1M", "toStartOfMinute(toDateTime({col}))"), + ], +) +def test_time_grain_expressions(time_grain: Optional[str], expected: str) -> None: + from superset.db_engine_specs.clickhouse import ClickHouseBaseEngineSpec + + assert ClickHouseBaseEngineSpec._time_grain_expressions[time_grain] == expected + + def test_convert_dttm_normalizes_aware_datetime_to_utc() -> None: from superset.db_engine_specs.clickhouse import ( ClickHouseEngineSpec as spec, # noqa: N813 From 097c99b19cb889061a7423fcc119c0637ce1203a Mon Sep 17 00:00:00 2001 From: DanielSwift1992 <40451130+DanielSwift1992@users.noreply.github.com> Date: Tue, 18 Aug 2026 19:21:01 -0400 Subject: [PATCH 3/3] fix: remove a labeler glob that matches no files (#43270) --- .github/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 2b08039ae5be..290cb5b2472f 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -29,7 +29,7 @@ "dependencies:python": - changed-files: - any-glob-to-any-file: - - 'superset/requirements/**' + - 'requirements/**' - 'superset/translations/requirements.txt' - 'RELEASING/requirements.txt'