You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "aminghadersohi (via GitHub)" <gi...@apache.org> on 2026/10/22 02:21:50 UTC

[PR] fix(sunburst): filter temporal segments by raw bucket values [superset]

aminghadersohi opened a new pull request, #45598:
URL: https://github.com/apache/superset/pull/45598

   ### SUMMARY
   
   Sunburst click cross-filters and drill-by take their values from formatted segment names, so temporal segments send labels such as `October` to timestamp columns. Monthly `smart_date` labels also omit the year.
   
   - Use the raw hierarchy `records` already retained on each node. Normalize raw temporal timestamps with the shared temporal filter helper; use upper-exclusive `TEMPORAL_RANGE` bounds for grained levels.
   - Send the matching `extraFormData.time_range`, as Timeseries does, because target queries rewrite temporal filter bounds from that value.
   - Share the filter construction between click, context-menu cross-filter, drill-by, and drill-to-detail.
   - Keep temporal selection identity independent of display formatting, while retaining categorical selection behavior.
   - Use the grain-aware formatter for `smart_date`; preserve explicit custom formats.
   
   Related work: https://github.com/apache/superset/pull/45571 adds the control/query path needed to configure grained Sunbursts in Explore. This PR is independent on master for raw temporal filtering and consumes grained responses using either the legacy temporal subject or that PR's temporal hierarchy lookup. It does not duplicate its grain UI/query changes.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   No screenshots captured: the local `http://localhost:8088/health` check refused the connection. Interactive dashboard acceptance remains unverified.
   
   Before: temporal filters contain display labels; monthly buckets from different years can share a label. After: payload tests expect raw timestamps or bucket ranges, and adaptive monthly labels include the year.
   
   ### TESTING INSTRUCTIONS
   
   Automated command, from `superset-frontend`:
   
   ```bash
   npm run test -- plugins/plugin-chart-echarts/test/Sunburst --maxWorkers=2
   ```
   
   - Same final tests against the two original source files from master: **13 failed, 7 passed, 20 total**.
   - With this change: **20 passed**, 2 suites.
   - Shared `test/utils/xAxisDrillByFilter.test.ts`: **12 passed**, 1 suite.
   - Standalone targeted TypeScript checking with project references removed: exit 0, no diagnostics.
   - Staged-file `pre-commit run`: formatting, lint, custom rules, stylelint and applicable general hooks pass. The frontend type hook fails with **TS6305** because the referenced plugin's generated `lib/Sunburst/*.d.ts` declarations have not been built. No hook was disabled.
   
   Regression test: 'cross-filters a raw temporal segment with the timestamp rather than its label'. Additional tests exercise Month/Year bounds, dashboard grain overrides, temporal lookup, inner/outer rings, categorical filters, drill actions, nulls, repeated custom labels, click-to-clear and distinguishable adaptive labels.
   
   Siblings checked:
   - superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx — not affected: cross-filters use getCrossFilterValue on cell values rather than labels
   - superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx — not affected: temporal cross-filters use timestamps with bucket bounds and time_range
   
   Manual verification:
   1. Add a Sunburst with categorical and temporal hierarchy levels to a dashboard with another chart in scope.
   2. Click a raw temporal segment: the target should select the matching timestamp without a timestamp parsing error.
   3. With a grained Sunburst (the related PR supplies the Explore grain controls), click Month and Year buckets: the target should include the entire bucket and exclude its upper boundary.
   4. Override the grain through a dashboard filter and repeat. Check both temporal ring positions.
   5. Check categorical clicks and click-to-clear. Right-click temporal segments and compare drill-by, drill-to-detail and cross-filter bounds.
   6. With adaptive date formatting, compare the same month in different years; each label should include its year. Custom date formats should remain respected.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(sunburst): filter temporal segments by raw bucket values [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6346360369

   @rebenitez1802 I need to correct two claims in my earlier reply: https://github.com/apache/superset/pull/45598#issuecomment-6345789382
   
   - My TypeScript-pass claim was wrong. At `81df187b05fcfe51bf40ac3bea4a46a6213c8e51`, `npx tsc --noEmit -p plugins/plugin-chart-echarts/tsconfig.json` reproduced `transformProps.ts(318,22): error TS2345: Argument of type 'TimeGranularity' is not assignable to parameter of type '"P1M" | "P3M" | "P1Y"'.`
   - The Hours-offset change covered only SQL-shift-capable engines. I should have explicitly listed the other engines' grained drill mismatch under Remaining.
   
   Fixed in `cfb96054943cbcba14b900bf17c838b4e943a38f`:
   1. The Month/Quarter/Year label check uses a type-safe comparison, without an assertion or suppression.
   2. Grained equality filters on the non-SQL-shift path subtract the pandas-only Hours offset from the selected bucket before native timestamp coercion. SQL-shift-capable engines retain their existing shifted grouping/comparison expressions. Dataset timezone takes precedence over Hours offset. Adhoc aliases that receive no pandas normalization are left unshifted, rather than subtracting an offset they never received.
   
   Regression test: `tests/unit_tests/models/test_hours_offset_bound_truncation.py::test_grained_drill_matches_every_bucket_with_hours_offset` covers both capability flags, offsets `0`, `+1`, `-1`, `+25`, `-25`, physical names, verbose names, `__timestamp`, inline adhoc columns, and adhoc labels. It compares every returned bucket's count and row identities, including midnight-boundary rows. `test_grained_drill_with_dataset_timezone_ignores_hours_offset` pins the timezone guard; `test_display_only_bucket_offset_value_formats` covers value formats and null/invalid inputs.
   
   Fail-before/pass-after: with the pre-fix `81df187b05fcfe51bf40ac3bea4a46a6213c8e51` backend source mounted over the final tests, the matrix plus timezone tests reported **`16 failed, 38 passed, 67 deselected`**. All 16 failures were nonzero-offset, SQL-shift-disabled physical/verbose/`__timestamp`/inline-adhoc cases. The same tests pass with this commit; the full Docker run below includes them and the flag-on regressions.
   
   Commands/results at this head:
   ```text
   # superset-frontend
   npx tsc --noEmit -p plugins/plugin-chart-echarts/tsconfig.json
   # no diagnostics; exit 0
   npx jest --runInBand --verbose plugins/plugin-chart-echarts/test/Sunburst plugins/plugin-chart-echarts/test/utils/xAxisDrillByFilter.test.ts plugins/plugin-chart-echarts/test/Timeseries/EchartsTimeseries.test.tsx
   # Test Suites: 5 passed, 5 total; Tests: 84 passed, 84 total; exit 0
   # Docker, SUPERSET_TESTENV=true, mounted checkout, container pr45598-ci
   pytest -n 2 --dist loadfile --cache-clear -q -o addopts="" tests/unit_tests/models/test_hours_offset_bound_truncation.py tests/unit_tests/models/helpers_test.py tests/unit_tests/connectors/sqla/models_test.py -m "not manual and not llm_compliance"
   # 495 passed in 31.33s; exit 0
   pre-commit run --files $(git diff --name-only origin/master...HEAD)
   # exit 0; Type-Checking (Frontend), mypy (main), and all applicable hooks Passed.
   # Hooks reporting no matching files were Skipped, not counted as passed.
   ```
   The first pre-commit attempt failed on formatting and a test typing error; the quoted result is the rerun after those corrections.
   
   Siblings checked:
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts:313 — fixed in cfb96054943cbcba14b900bf17c838b4e943a38f
   - superset/models/helpers.py:4147 — fixed in cfb96054943cbcba14b900bf17c838b4e943a38f
   - superset/models/helpers.py:5366 — fixed in cfb96054943cbcba14b900bf17c838b4e943a38f
   - superset/models/helpers.py:5444 — fixed in cfb96054943cbcba14b900bf17c838b4e943a38f
   - superset/models/helpers.py:5410 — not affected: unknown adhoc aliases have no pandas Hours offset; the matrix pins their unchanged bucket/count behavior with both capability flags
   - superset/models/helpers.py:4225 — not affected: TEMPORAL_RANGE returns before the equality-value adjustment; existing range-bound tests pass
   - superset/connectors/sqla/models.py:1398 — not affected: the SQL-shift-enabled grouping path is unchanged and covered by the flag-on matrix and existing offset tests
   - superset/connectors/sqla/models.py:2275 — not affected: adhoc SQL-shift grouping retains its existing capability/timezone guards
   - superset/db_engine_specs/base.py:579 — fixed in cfb96054943cbcba14b900bf17c838b4e943a38f
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx:141 — not affected: Drill to detail already emits epoch equality plus grain and reaches the corrected backend
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx:151 — not affected: Drill by uses the same equality serializer and backend path
   - superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:685 — not affected: fallback equality reaches the shared backend; known-grain ranges remain unchanged
   - superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:702 — not affected: the second shared-helper caller retains the same serialization; Timeseries Jest tests pass
   - superset/common/query_context_factory.py:448 — not affected: only TEMPORAL_RANGE is rewritten by time_range; equality is preserved
   - superset/common/query_context_processor.py:549 — not affected: sync/async query consumers delegate to the same datasource result builder
   - superset/charts/data/api.py:228 — not affected: authorized chart requests use QueryContext and the shared datasource filter builder
   - superset/mcp_service/chart/chart_helpers.py:1312 — not affected: builds QueryContext rather than a separate filter implementation
   - superset/mcp_service/dashboard_scope_sql.py:406 — not affected: its ungrained direct coercion call retains the default zero adjustment
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/buildQuery.ts — not affected: no custom grain-selection branch exists at this head; sibling integration remains below
   
   Remaining: stacking with https://github.com/apache/superset/pull/45571 and adopting `getSunburstTimeGrain` in its `buildQuery` are not complete. I did not change that branch.
   
   Remaining: the pre-existing Timeseries known-grain Drill by range/time_range behavior is unchanged. Browser acceptance and live Trino/BigQuery/Snowflake/MySQL execution were not run; the non-SQL-shift regression executes SQLite with the capability explicitly disabled.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: filter Sunburst temporal segments by bucket and invert Hours offset in grained filters [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #45598:
URL: https://github.com/apache/superset/pull/45598#discussion_r4354120429


##########
docs/docs/using-superset/exploring-data.mdx:
##########
@@ -489,6 +489,25 @@ The **Custom** time range picker accepts natural language expressions alongside
 
 These expressions are evaluated at query time, so saved charts always display data relative to the current date.
 
+### Sunburst cross-filtering
+
+Sunburst cross-filters use the underlying hierarchy values, not the formatted
+segment labels. For time-grained temporal levels, selecting a segment filters the
+entire bucket. Adaptive date formatting includes the year in month and quarter
+labels to distinguish buckets across years; other grains keep their compact labels.
+For supported bucket ranges, the selection replaces the target chart's Time Range
+and also applies to its other temporal range filters, even on another time column.
+Drill to detail retains the selected bucket within the chart's time range, including
+a dataset Hours offset. Drill by filters a time-grained segment by its bucket range.
+As with Time-series charts, a chart or dashboard Time Range replaces that range, and an
+engine-specific grain without a fixed length matches only the start of the bucket.

Review Comment:
   I used your suggested wording for the two Time Range exceptions and the engine-specific grain limitation.
   
   Commit: 8dcf1a62d00ee7e7fbe8d0ae45e574d675d5c108
   
   Tests: no regression test needed for this docs-only wording change. `pre-commit run` passed; `git diff --cached --check` passed before the commit.
   
   Siblings checked:
   - docs/docs/using-superset/exploring-data.mdx:500 — fixed in 8dcf1a62d00ee7e7fbe8d0ae45e574d675d5c108
   - superset/common/query_context_factory.py:410 — not affected: shared query behavior is unchanged; the paragraph describes its existing filter replacement
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/utils.ts:146 — not affected: Drill to detail filter construction is unchanged
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/utils.ts:173 — not affected: Drill by filter construction is unchanged
   - docs/docs/using-superset/using-ai-with-superset.mdx:483 — not affected: MCP hierarchy documentation makes no drill bucket guarantee
   
   Remaining: the shared QueryContextFactory behavior you described needs a separate follow-up with a granularity_sqla plus chart TEMPORAL_RANGE regression test; this commit documents the limitation rather than changing that behavior.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: filter Sunburst temporal segments by bucket and invert Hours offset in grained filters [superset]

Posted by "rebenitez1802 (via GitHub)" <gi...@apache.org>.
rebenitez1802 commented on code in PR #45598:
URL: https://github.com/apache/superset/pull/45598#discussion_r4353328197


##########
docs/docs/using-superset/exploring-data.mdx:
##########
@@ -489,6 +489,25 @@ The **Custom** time range picker accepts natural language expressions alongside
 
 These expressions are evaluated at query time, so saved charts always display data relative to the current date.
 
+### Sunburst cross-filtering
+
+Sunburst cross-filters use the underlying hierarchy values, not the formatted
+segment labels. For time-grained temporal levels, selecting a segment filters the
+entire bucket. Adaptive date formatting includes the year in month and quarter
+labels to distinguish buckets across years; other grains keep their compact labels.
+For supported bucket ranges, the selection replaces the target chart's Time Range
+and also applies to its other temporal range filters, even on another time column.
+Drill to detail retains the selected bucket within the chart's time range, including
+a dataset Hours offset. Drill by filters a time-grained segment by its bucket range.
+As with Time-series charts, a chart or dashboard Time Range replaces that range, and an
+engine-specific grain without a fixed length matches only the start of the bucket.

Review Comment:
   Non-blocking (this happens on master too): these lines overstate what grained drills do in the default setup.
   
   A Sunburst level is grained only when it is the query's `granularity` (a dashboard Time Column filter or a legacy `granularity_sqla`). With no `x_axis`, `QueryContextFactory._apply_granularity` (`query_context_factory.py:410-436`) does two things. It drops **every** filter on the granularity column, whatever the operator. Then it rebuilds the time bounds from the **first** `TEMPORAL_RANGE`, which is usually the chart's own default `No filter`. So in a SQLite repro (4 rows, 2 in the clicked month, Time Column `ts`, Time Grain P1M), I got these results:
   
   - Drill by with any chart Time Range filter: no `WHERE` clause, 4 rows.
   - Drill to detail with the chart's default filter on `ts`: 4 rows.
   - Drill to detail with the default filter on another column, or with no chart time filter: 2 rows (correct).
   
   Suggested wording below. The real fix is to have `_apply_granularity` drop only the `TEMPORAL_RANGE` it replaces. That changes shared behaviour, so it fits a follow-up PR better, with a test through `QueryContextFactory` using `granularity_sqla` plus a chart `TEMPORAL_RANGE` filter.
   
   ```suggestion
   Drill to detail matches the selected bucket, including a dataset Hours offset, unless
   the chart also has a Time Range filter on the grained Time Column. Drill by matches the
   bucket only when the chart has no Time Range filter. Otherwise the query rebuilds its
   time bounds from the chart or dashboard Time Range, so the drill returns every row in
   that range. An engine-specific grain without a fixed length matches only the start of
   the bucket.
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(sunburst): filter temporal segments by raw bucket values [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6346734980

   @rebenitez1802 I found another gap in my previous reply: https://github.com/apache/superset/pull/45598#issuecomment-6346360369
   
   Fixed in `db78e36ce9ec440f47da952356e43b6ae63978c4`: grained `IN` / `NOT IN` filters now undo the display-only Hours offset for **each** bucket value on engines without SQL temporal shifting. Searching the other operators found the same issue in `!=`, `>`, `<`, `>=`, and `<=`; these use the same adjustment. The `==`, SQL-shift-enabled, and dataset-timezone paths retain their behavior.
   
   Regression tests in `tests/unit_tests/models/test_hours_offset_bound_truncation.py`:
   - `test_grained_drill_matches_every_bucket_with_hours_offset`: all eight comparisons, offsets `0`, `+1`, `-1`, `+25`, `-25`, both capability flags, physical/verbose/`__timestamp`/inline-adhoc/adhoc-label paths. Filters consume actual `P1D` grouped bucket values; assertions check counts and row identities, not just generated SQL.
   - `test_grained_membership_filter_shifts_each_bucket_value`: two nonadjacent buckets plus NULL, `IN` and `NOT IN`, offsets `+1` and `-1`, both flags; checks included/excluded timestamps and NULL handling.
   - `test_grained_drill_with_dataset_timezone_ignores_hours_offset`: expanded to `IN` / `NOT IN` as timezone-precedence controls.
   
   Fail-before/pass-after (Docker, same tests with `helpers.py` from `cfb96054943cbcba14b900bf17c838b4e943a38f`): matrix/timezone selection reported **`96 failed, 316 passed`**, including `IN` and `NOT IN` at both `+1` and `-1` with SQL shifting disabled. The multi-value test reported **`4 failed, 4 passed`**; all four failures were the capability-disabled cases. With the changed helper, the full three-file run reported **`861 passed, 3817 warnings in 28.71s`**, exit 0.
   
   Commands/results:
   ```text
   # Docker pr45598-python, SUPERSET_TESTENV=true, checkout source/tests copied in
   pytest -n 2 --dist loadfile --cache-clear -q -o addopts="" tests/unit_tests/models/test_hours_offset_bound_truncation.py tests/unit_tests/models/helpers_test.py tests/unit_tests/connectors/sqla/models_test.py -m "not manual and not llm_compliance"
   # 861 passed; exit 0
   # Fail-before selections: -k "matches_every_bucket or dataset_timezone_ignores"
   # and -k membership_filter_shifts_each_bucket_value
   # From superset-frontend
   npx jest --runInBand plugins/plugin-chart-echarts/test/Sunburst plugins/plugin-chart-echarts/test/utils/xAxisDrillByFilter.test.ts plugins/plugin-chart-echarts/test/Timeseries/EchartsTimeseries.test.tsx
   # Test Suites: 5 passed, 5 total; Tests: 84 passed, 84 total; exit 0
   pre-commit run --files $(git diff --name-only origin/master...HEAD)
   # exit 0; applicable hooks Passed, including mypy and frontend type-checking
   ```
   Initial test-setup/type-check iterations were corrected before the quoted final runs. I removed the test containers with `docker rm -fv`; `docker ps -a --filter name=pr45598` returned only the header.
   
   Siblings checked:
   - superset/models/helpers.py:5522 — fixed in db78e36ce9ec440f47da952356e43b6ae63978c4
   - superset/models/helpers.py:4259 — not affected: the existing list loop already applies the offset inversion per operand; the corrected caller guard enables it for membership filters
   - superset/models/helpers.py:5366 — not affected: inline adhoc grain resolution reaches the shared guard; the expanded matrix pins all eight comparisons
   - superset/models/helpers.py:5410 — not affected: adhoc aliases absent from dataset datetime metadata have no pandas offset to invert; label controls pass
   - superset/models/helpers.py:5444 — not affected: physical, verbose-name, and __timestamp expression resolution reaches the shared guard; each is covered by the matrix
   - superset/models/helpers.py:4225 — not affected: TEMPORAL_RANGE bypasses operand shifting and retains its separate time-bound adjustment; existing range tests pass
   - superset/models/helpers.py:5698 — not affected: null checks have no bucket operands; LIKE/ILIKE patterns are not bucket literals; boolean and array operators are not temporal bucket comparisons and are excluded from the adjustment
   - superset/connectors/sqla/models.py:1398 — not affected: SQL-shift grouping is unchanged; flag-on matrix cases pass
   - superset/connectors/sqla/models.py:2275 — not affected: adhoc SQL-shift grouping retains its capability/timezone guards; inline/label controls pass
   - superset/db_engine_specs/base.py:579 — not affected: unchanged declaration of supports_temporal_column_shift = False, not a fix in cfb96054943cbcba14b900bf17c838b4e943a38f; git diff 81df187b05 HEAD -- superset/db_engine_specs/base.py is empty, correcting my previous sibling entry
   - superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:599 — not affected: its grained IN serialization is valid and reaches the corrected backend; __timestamp matrix cases pin that payload shape
   - superset-frontend/plugins/plugin-chart-ag-grid-table/src/utils/getCrossFilterDataMask.ts:70 — not affected: both single-cell and grouped-row grained IN serializers reach the corrected backend; single/multi-value regressions cover those shapes
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx:141 — not affected: both drill actions already emit equality plus grain; equality controls and Sunburst Jest pass
   - superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:685 — not affected: fallback equality reaches the shared backend; known-grain range behavior is unchanged
   - superset/common/query_context_factory.py:448 — not affected: only TEMPORAL_RANGE is rewritten by time_range, not the comparisons changed here
   - superset/mcp_service/dashboard_scope_sql.py:406 — not affected: this other filter_values_handler caller is ungrained and leaves temporal_offset_hours at its zero default
   
   Remaining:
   - Stacking with https://github.com/apache/superset/pull/45571 and adopting getSunburstTimeGrain in its buildQuery are not implemented here; that branch was not changed.
   - The existing Timeseries known-grain range/time_range overwrite limitation is unchanged.
   - Live external-engine/browser acceptance was not run; the capability-disabled path was executed using SQLite with supports_temporal_column_shift explicitly set to False. No real-LLM checks were run.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(sunburst): filter temporal segments by raw bucket values [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6333840535

   Manual check on a local docker-compose-light env (examples dataset `cleaned_sales_data`, counts compared with SQL on the same database), head 37e5c78a8617b5ca52b73e172ba12673f03f2e93:
   
   - Cross-filters from the temporal ring now return exactly the bucket: raw 2003-11-14 → 38, Oct 2003 → 158, Nov 2004 → 301, Year 2004 → 1345, temporal outer ring Nov 2003 → 296, dashboard Time column + Time grain = Month on an ungrained chart → 158. On master every target failed with `invalid input syntax for type timestamp`.
   - Categorical rings: same filters and totals as master (967, 1384). Same results for a Gamma user with dataset access and an embedded guest.
   - Month labels include the year (Oct 2003 / Oct 2004); Drill by from an ungrained segment returns 2 / 19 / 17 rows (master: HTTP 400).
   - Drill to detail on a grained segment returned every row of the chart's time range (2823, or 2345 under a dashboard range): samples queries replace `TEMPORAL_RANGE` values with `time_range`. Commit 37e5c78a8617b5ca52b73e172ba12673f03f2e93 matches the bucket label with its grain instead, as Timeseries does; test `drill to detail matches a grained bucket by its label and grain` fails before it and passes after; live result 158.
   - Still open, not changed here: a grained Drill by has the same `time_range` problem (2823 / 2345 instead of 158). Timeseries x-axis Drill by on master does the same, so it needs a fix in the shared drill-by path. Also shared with Timeseries: a cross-filter on a bucket only partly inside the dashboard time range filters targets to the whole bucket.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: filter Sunburst temporal segments by bucket and invert Hours offset in grained filters [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi merged PR #45598:
URL: https://github.com/apache/superset/pull/45598


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(sunburst): filter temporal segments by raw bucket values [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6345789382

   @rebenitez1802 I pushed 81df187b05fcfe51bf40ac3bea4a46a6213c8e51 with the following changes for the body-only review:
   
   1. **Epoch equality values:** fixed. Sunburst equality filters retain raw epochs; Date values serialize as milliseconds. The shared temporal helper also returns numeric equality values, including its Timeseries callers. Regression: `ungrained drill to detail keeps the epoch value for native engine coercion` in `superset-frontend/plugins/plugin-chart-echarts/test/Sunburst/EchartsSunburst.test.tsx`.
   2. **Drill design / Hours offset:** both Sunburst drill actions use raw `==` plus `grain`, without constructing and discarding a range. The backend applies dataset offset before truncation for grained comparisons on engines supporting SQL temporal shifts, including physical columns, inline adhoc columns, and adhoc labels. Regressions: `test_grained_drill_equality_returns_the_segment_rows_with_hours_offset` and `test_grained_drill_filter_by_adhoc_label_applies_hours_offset` in `tests/unit_tests/models/test_hours_offset_bound_truncation.py`; these check actual row identities/counts with positive and negative offsets. Remaining: stacking with https://github.com/apache/superset/pull/45571 and adopting `getSunburstTimeGrain` in its `buildQuery` are not complete. I sent the sibling worker this head and the merge-first/shared-helper plan; I did not modify that branch.
   3. **Effective Time Column:** fixed. Dashboard granularity takes precedence; implicit semantic graining requires exactly one selected temporal level. Regressions in `superset-frontend/plugins/plugin-chart-echarts/test/Sunburst/utils.test.ts`: `does not grain ambiguous semantic hierarchies with two temporal levels` and `dashboard time column takes precedence in a two-temporal-level hierarchy`.
   4. **Unknown grains:** fixed in the shared fallback: numeric `==` plus `grain`, with the regular label formatter. The six engine/addon grain cases in Sunburst test `preserves the engine grain %s for cross-filter and drill equality` cover both drill actions and cross-filtering. Timeseries caller regression: `temporal drill by preserves native epoch coercion and fallback grain %s` in `superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/EchartsTimeseries.test.tsx`.
   5. **Drill by time-range overwrite:** fixed for Sunburst using the same equality-plus-grain helper as Drill to detail. Regression: `drill by preserves a grained bucket when the chart has a time range`. Remaining: the pre-existing Timeseries known-grain range behavior is unchanged and documented in the description.
   6. **Label scope:** restricted the adaptive override to Month/Quarter/Year; Week/Day/Hour and unknown grains retain their compact formatter. Regression: `keeps compact smart_date labels for %s` in `superset-frontend/plugins/plugin-chart-echarts/test/Sunburst/transformProps.test.ts`. I updated the description and docs.
   7. **Selection keys:** Date keys use `getTime()`; unchanged legacy display-label keys remain selectable/highlighted. Regressions: `Date selection keys use epoch milliseconds` and `legacy label-based temporal selections remain highlighted and click to clear`. The compatibility fallback matches unchanged labels, not old month/quarter labels that were reformatted.
   8. **Cross-filter Time Range side effects:** documented that bucket ranges replace the target Time Range and affect its other temporal range filters, including other time columns.
   9. **Docs placement:** moved the paragraph to a dedicated Sunburst cross-filtering section and removed the upper-bound implementation detail.
   10. **Test gaps / helper clarity:** added the cases above, Quarter coverage, and the Hours-offset execution regressions. The Year label case remains a preservation check, not evidence for the label change. The drill helper constructs equality directly.
   
   Fail-before/pass-after proof: with source temporarily restored to reviewed head `37e5c78a8617b5ca52b73e172ba12673f03f2e93`, the final Jest run had **26 failures** and the focused Hours-offset run had **7 failures**. After restoring the implementation: **84 Jest tests passed (5 suites)** and **432 Docker Python tests passed** across the offset, helpers, and SQLA-model suites. Scoped pre-commit passed, including TypeScript, mypy, ruff, and pylint. Browser acceptance was not rerun.
   
   Siblings checked:
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/utils.ts — fixed in 81df187b05fcfe51bf40ac3bea4a46a6213c8e51
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx — fixed in 81df187b05fcfe51bf40ac3bea4a46a6213c8e51
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/transformProps.ts — fixed in 81df187b05fcfe51bf40ac3bea4a46a6213c8e51
   - superset-frontend/plugins/plugin-chart-echarts/src/utils/xAxisDrillByFilter.ts — fixed in 81df187b05fcfe51bf40ac3bea4a46a6213c8e51
   - superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:685 — fixed in 81df187b05fcfe51bf40ac3bea4a46a6213c8e51
   - superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:702 — fixed in 81df187b05fcfe51bf40ac3bea4a46a6213c8e51
   - superset/models/helpers.py:5343 — fixed in 81df187b05fcfe51bf40ac3bea4a46a6213c8e51
   - superset/models/helpers.py:5382 — fixed in 81df187b05fcfe51bf40ac3bea4a46a6213c8e51
   - superset/models/helpers.py:5416 — fixed in 81df187b05fcfe51bf40ac3bea4a46a6213c8e51
   - superset/common/query_context_factory.py:448 — not affected: only rewrites TEMPORAL_RANGE, while both Sunburst drill actions emit equality
   - superset/connectors/sqla/models.py:1322 — not affected: existing SQL-shift capability/timezone guards remain intact, and temporal range bounds retain their separate offset handling
   - superset/semantic_layers/mapper.py:1280 — not affected: the existing single-temporal-axis rule is mirrored by the frontend helper
   - superset/charts/data/api.py:228 — not affected: delegates canonical QueryObjects to the shared datasource path exercised by the Python execution regressions
   - superset/mcp_service/chart/chart_helpers.py:1312 — not affected: uses QueryContextFactory rather than a separate Sunburst click-filter serializer
   - superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/buildQuery.ts — not affected: this head has no custom grain-detection branch; sibling adoption remains listed above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: filter Sunburst temporal segments by bucket and invert Hours offset in grained filters [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6352823278

   @rebenitez1802 thanks for the approval. The one ask in it, the inline docs suggestion on `docs/docs/using-superset/exploring-data.mdx`, is applied as you worded it in 8dcf1a62d00ee7e7fbe8d0ae45e574d675d5c108; details in https://github.com/apache/superset/pull/45598#discussion_r4354120429. No code changed in that commit. Noted the correction about the round-1 `TEMPORAL_RANGE` Drill by.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(sunburst): filter temporal segments by raw bucket values [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6332913252

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/45598?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `97.56098%` with `1 line` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 84.12%. Comparing base ([`4e5d0ef`](https://app.codecov.io/gh/apache/superset/commit/4e5d0ef8f13d1b878801851e1801f9672ef155e4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`fef27aa`](https://app.codecov.io/gh/apache/superset/commit/fef27aa701106c7b33a1e05ecbc440ea5951410c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/45598?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...plugins/plugin-chart-echarts/src/Sunburst/utils.ts](https://app.codecov.io/gh/apache/superset/pull/45598?src=pr&el=tree&filepath=superset-frontend%2Fplugins%2Fplugin-chart-echarts%2Fsrc%2FSunburst%2Futils.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvU3VuYnVyc3QvdXRpbHMudHM=) | 94.44% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/45598?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #45598      +/-   ##
   ==========================================
   + Coverage   84.10%   84.12%   +0.02%     
   ==========================================
     Files        3056     3057       +1     
     Lines      201285   201313      +28     
     Branches    47066    47084      +18     
   ==========================================
   + Hits       169299   169363      +64     
   + Misses      28747    28711      -36     
     Partials     3239     3239              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/45598/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/45598/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `80.21% <97.56%> (+0.04%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/45598?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: filter Sunburst temporal segments by bucket and invert Hours offset in grained filters [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6348608455

   @rebenitez1802 One more item for Remaining in https://github.com/apache/superset/pull/45598#issuecomment-6348210986, found by an independent check of that reply at head 62cef72cee285fa71d1b5d43fe44a69ea48422ff: on a dataset with a valid non-UTC timezone (America/Los_Angeles) and an Hours offset of 1, a grained `==` or `IN` filter on a one-row day bucket returns 0 rows and the matching `NOT IN` returns 2 rows instead of 1, with and without the SQL shift. The displayed bucket labels are converted to the local timezone, but the grained comparison value is not converted back to UTC and is not compared against a similarly converted grouping expression. This is pre-existing on master: the merge-base `superset/models/helpers.py` reproduces the same six failures. It is out of scope for this PR, whose gate only inverts the Hours offset when the timezone is absent or invalid, and it will get its own PR after this one lands.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix: filter Sunburst temporal segments by bucket and invert Hours offset in grained filters [superset]

Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6348210986

   @rebenitez1802 Follow-up to review https://github.com/apache/superset/pull/45598#pullrequestreview-5618060738, at head 62cef72cee285fa71d1b5d43fe44a69ea48422ff. "Fail before" below means the test fails with the source files from 9e3574536b2b4f83ab439083f12010a94507522b (the reviewed head plus one test-only commit) and passes at the fixing commit.
   
   **🔴 Drill by drops `grain`** — fixed in 4e8c60e92ebbcec7bcc4e296677b80691361090d. I took your first fix: Sunburst Drill by sends a grained segment as its `TEMPORAL_RANGE` bucket (new `getSunburstDrillByFilter`). Drill to detail keeps `==` + `grain`, which goes to the backend without `simpleFilterToAdhoc`. The docs now state the Time Range override and the start-instant match for engine-specific grains, as for Timeseries.
   Regression tests (fail before / pass after):
   - `superset-frontend/src/components/Chart/DrillBy/DrillByTemporalFilters.test.tsx` › `Sunburst Drill by on a grained segment queries the whole bucket`. It right-clicks a rendered Sunburst, opens `DrillByModal` with those filters and checks `queries[0].filters` in the posted chart-data request, after `simpleFilterToAdhoc` and `convertFilter`. Before: `{col: 'order_date', op: '==', val: 1727740800000}`.
   - `EchartsSunburst.test.tsx` › `drill by selects a grained bucket with its TEMPORAL_RANGE`, and `preserves the engine grain %s for cross-filter and drill equality` (6 cases).
   Backend pin (passes on the base too; the backend is unchanged here): `test_hours_offset_bound_truncation.py::test_drill_by_bucket_range_returns_the_segment_rows_with_hours_offset` executes that range shape on SQLite, with and without SQL shift, for offsets 0/1/-1, and gets each segment's row count.
   `DrillByTemporalFilters.test.tsx` › `Drill by drops the grain of an equality filter` pins the shared behavior you described.
   Siblings checked:
   - `superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx:86` — not affected: the cross-filter (`getSunburstFilter`) is already a range, sent through `extraFormData`.
   - `superset-frontend/plugins/plugin-chart-echarts/src/Sunburst/EchartsSunburst.tsx:142` — not affected: Drill to detail (`getSunburstDetailFilter`) filters reach the backend with `grain`.
   - `superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:685` — fixed in 4e8c60e92e: the shared helper returns master's clause again, with no `grain` key; known grains already used a range.
   - `superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/EchartsTimeseries.tsx:702` — fixed in 4e8c60e92e: same helper, forced-categorical temporal axis.
   - `superset-frontend/src/components/Chart/DrillBy/DrillBySubmenu.tsx:156` — not affected: the `xAxisFilters` merge feeds the same `DrillByModal` conversion, covered by the request-path test.
   - `superset-frontend/src/components/Chart/DrillBy/DrillByModal.tsx:264` — not affected: `getFiltersFromConfigsByFieldName` uses the same `simpleFilterToAdhoc` conversion.
   - `docs/docs/using-superset/exploring-data.mdx` — fixed in 4e8c60e92e.
   
   **🟡 Epoch values break Timeseries Drill by on adhoc x-axes** — fixed in 4e8c60e92ebbcec7bcc4e296677b80691361090d. `getTemporalXAxisDrillByFilter` sends master's naive ISO datetime again, and its tests are back to master's expectations.
   Regression tests (fail before / pass after):
   - `DrillByTemporalFilters.test.tsx` › `Timeseries Drill by on an adhoc x-axis label sends an ISO datetime, not an epoch` (request path; covers the exact and the engine-grain fallback).
   - `test/Timeseries/EchartsTimeseries.test.tsx` › `temporal drill by compares a naive ISO datetime for grain %s` (2 cases).
   - `src/Timeseries/EchartsTimeseries.test.tsx` › `drillBy uses the swapped data index for a horizontal time-based axis` and the three `getTemporalXAxisDrillByFilter` exact-match tests, restored to master.
   Backend evidence (passes on the base too): `test_adhoc_label_drill_comparator_is_not_coerced` compiles a filter on an adhoc x-axis label: an epoch reaches SQL as `= 1785628800000`, an ISO value as a quoted literal.
   Siblings checked:
   - Sunburst adhoc temporal levels — fixed in 4e8c60e92e: cross-filter, Drill to detail and Drill by sent an epoch for an adhoc SQL level too, where `target_native_type` is None and nothing converts it. They send the ISO datetime; physical columns keep the epoch. Tests: `EchartsSunburst.test.tsx` › `adhoc temporal levels compare a naive ISO datetime, not an epoch integer`, and `DrillByTemporalFilters.test.tsx` › `Sunburst Drill by on an adhoc temporal segment writes a quoted ISO datetime` (both fail before).
   - `superset/models/helpers.py` `handle_temporal_value`, engines whose `convert_dttm` returns None — not changed. `TableColumn.type_generic` returns TEMPORAL for every `is_dttm` column, including BIGINT epoch columns, where the integer must pass through. An ISO fallback there would break those columns, so I took your first option.
   
   **🟡 Hours-offset fix only covers `==` without SQL shift** — fixed in db78e36ce9ec440f47da952356e43b6ae63978c4, pushed at 17:13:20Z, 20 s before this review was submitted, so the review text describes cfb9605494. The value adjustment gate covers `==`, `!=`, `IN`, `NOT IN`, `<`, `<=`, `>`, `>=`.
   Regression tests (fail with cfb9605494's `helpers.py`, pass at db78e36ce9 and at the final head, run in Docker): `test_grained_membership_filter_shifts_each_bucket_value` (4 of 8 cases fail before) and `test_grained_drill_matches_every_bucket_with_hours_offset` (96 cases fail before).
   Siblings checked:
   - `TableChart.tsx:601` (`IN` + `grain` on the time column) — fixed in db78e36ce9: the `IN` / `NOT IN` cases above.
   - `plugin-chart-ag-grid-table/src/utils/getCrossFilterDataMask.ts` — fixed in db78e36ce9: same filter shape and backend path.
   - physical, verbose, `__timestamp`, adhoc and adhoc-label filter paths — fixed in db78e36ce9: each is a parameter of the matrix test.
   
   **🟡 Backend change affects every chart's grained filters** — partly done, at 62cef72cee. I retitled the PR to `fix: filter Sunburst temporal segments by bucket and invert Hours offset in grained filters`. The description lists the affected charts (Drill to detail from Timeseries, Mixed Timeseries, Big Number with trendline, Pivot Table and Sunburst; Table and AG Grid Table grained cross-filters) and names the reversal of https://github.com/apache/superset/pull/43173. I kept one PR rather than splitting.
   
   **🟢 Timezone check doesn't match pandas** — fixed in 62cef72cee285fa71d1b5d43fe44a69ea48422ff. The gate checks whether the timezone resolves (`_has_valid_dataset_timezone`). With an unresolvable timezone, the SQL shift is skipped on every engine and pandas falls back to the Hours offset, so the bucket value is inverted on both engine groups.
   Regression test: `test_grained_drill_with_invalid_dataset_timezone_uses_hours_offset` (12 cases, all fail before, pass after; Docker).
   Siblings checked:
   - `superset/connectors/sqla/models.py:1404` and `:2280` (SQL shift gates) — not affected: they skip the shift for any configured timezone, which the new gate accounts for.
   - `superset/models/helpers.py` `get_time_filter` — not affected: it already falls back to the Hours offset on `ZoneInfoNotFoundError`.
   - `superset/models/helpers.py` `_collect_dttm_labels` / `normalize_dttm_col` — not affected: unshifted labels get the pandas offset, which the test asserts.
   
   **🟢 Legacy label fallback false highlighting** — fixed in 4e8c60e92ebbcec7bcc4e296677b80691361090d. Highlighting compares keys level by level (`isSunburstPathSelected`): a segment stays lit only when its key is the selected key or one of its ancestors.
   Regression test: `transformProps.test.ts` › `a year label is not highlighted by digits inside a selected epoch key` (fails before, passes after).
   Siblings checked:
   - `EchartsSunburst.tsx` `isCurrentValueSelected` — not affected: exact `Array.includes` on whole keys.
   
   **🟢 Ungrained temporal equality with an Hours offset** — not fixed. I narrowed the docs at `exploring-data.mdx` to say so.
   
   **🟢 `base.py:579`** — you are right: `superset/db_engine_specs/base.py` is not changed in this PR. Line 579 is the `supports_temporal_column_shift` default that `helpers.py` reads. My earlier "fixed" for that line was wrong.
   
   **🟢 https://github.com/apache/superset/pull/45571 coordination** — open, see Remaining.
   
   Validation at 62cef72cee: `npx tsc --noEmit` in the ECharts plugin exit 0; `npx jest --runInBand plugins/plugin-chart-echarts src/components/Chart` 1615 passed, 1 skipped (123 suites); Docker Python 3.11 `pytest -n 2 --dist loadfile` on `test_hours_offset_bound_truncation.py`, `helpers_test.py` and `connectors/sqla/models_test.py` 881 passed; changed-file pre-commit with ruff 0.9.7 exit 0.
   
   Remaining:
   - Drill by on a grained segment: a chart or dashboard Time Range replaces the bucket range, and an engine-specific grain matches only the bucket start. Both are shared with Timeseries Drill by; carrying `grain` through `SimpleAdhocFilter` → `simpleFilterToAdhoc` → `convertFilter` is left for its own PR.
   - Ungrained temporal equality with an Hours offset compares the stored timestamp (not new, every engine).
   - Physical temporal columns on engines whose `convert_dttm` returns None still receive the epoch integer in Drill to detail and cross-filters, as on master for every chart's Drill to detail.
   - The PR is not split; I have not requested a review from the author of https://github.com/apache/superset/pull/43173.
   - https://github.com/apache/superset/pull/45571 lands first. This PR then merges master, adopts its `timeGrain.ts` (which grains every temporal level when no time column is set), and the stacking resolves the overlapping files. Its broader `helpers.py` change would shift `TEMPORAL_RANGE` + grain twice and should be dropped in favour of this one; I have not edited that branch.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(sunburst): filter temporal segments by raw bucket values [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6331162903

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | 06d5e71712226496270ca2d6cee237a47b042678 |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6ad9733fcd897c03048edf62 |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-45598--superset-docs-preview.netlify.app](https://deploy-preview-45598--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQ1NTk4LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.uVTd5cjozl8RDMRKUNc8OkuSAhecvlqGFpVpfhJyPtA)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpLCoAgEADQu8w6QTLSukHHMEdJ8MeoUER3z91bvBcK5Vga7AATnKSTuYadv1nt6exUG2s2lkw6MEO5VudDszQy2hLyc-Doq8ZNCuEMqk0aLviiLLp1hu8H) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-45598--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(sunburst): filter temporal segments by raw bucket values [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #45598:
URL: https://github.com/apache/superset/pull/45598#issuecomment-6334063052

   ## CodeAnt PR Risk: Low Risk
   
   - The PR appears safe to merge; no actionable issues were identified in the review.
   
   **Assessed commit:** `37e5c78a8617`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org