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

   ### SUMMARY
   
   Sixth and last of the partition filter mapping stack, implementing 
**wireframe 1d** — the piece that tells a chart author *why* their query got 
faster.
   
   Stacked on `hughhhh/pfm-5-editor-ui`. Review the [compare against 
pfm-5](https://github.com/apache/superset/compare/hughhhh/pfm-5-editor-ui...hughhhh/pfm-6-explore-indicator)
 rather than the diff against master.
   
   A small glyph appears on any filter whose column the dataset mirrors onto 
its partition column, with the tooltip *"This filter is also applied to a 
partition column for faster queries. See 'View query' for the generated SQL."* 
Chart authors configure nothing and ideally never learn the word "partition"; 
per the PRD the indicator exists only to explain the speed-up and point at the 
SQL.
   
   **Where it renders.** Explore models the time range as a `TEMPORAL_RANGE` 
adhoc filter, so the time range and ordinary filters are the same chip — one 
indicator covers both cases from 1d. The path that actually renders is 
`DndAdhocFilterOption` → `OptionWrapper` → `Option`; `OptionControlLabel` and 
the legacy `AdhocFilterOption` are wired too, so the glyph does not silently 
vanish on whichever surface uses them. The standalone `time_range` control gets 
the mapping through a new `mapStateToProps`, for viz types that still have one.
   
   **Naming.** `partitionColumn` already exists on these components as the 
unrelated Presto `latest_partition` feature, so this is `partitionMapping` 
throughout to avoid two meanings of the same word one prop apart.
   
   **Also fixes a bug this made visible.** `partition_filter_mapping_summary` 
was not gated on the feature flag, so with `PARTITION_FILTER_MAPPING` off the 
payload still reported `active: true`. Nothing is mirrored in that state — 
`resolve_partition_mapping` returns `None` — so the indicator was promising a 
predicate the query never carried. The summary now gates the same way the query 
path does. The bug has been in the stack since pfm-1; it was invisible until 
something rendered from it, which is exactly what this PR does.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   _Attaching separately: `08-1d-explore-indicator.png` — the glyph on the 
`event_time` time-range chip with its tooltip open, and no glyph on the 
`country` dimension or `SUM(revenue)` metric._
   
   ### TESTING INSTRUCTIONS
   
   Automated: 821 backend and 837 frontend tests pass; `tsc`, `ruff`, `ruff 
format` and `oxlint` clean.
   
   Manually, on top of a dataset configured per pfm-5 (mapping `event_time → 
dt_epoch`, active):
   
   1. Open a chart on that dataset with a time-range filter.
   2. The **Filters** chip `2026-07-01 ≤ event_time < 2026-08-01` carries a 
small green filter glyph; the `country` dimension and `SUM(revenue)` metric do 
not.
   3. Hover the glyph → *"This filter is also applied to a partition column for 
faster queries. See 'View query' for the generated SQL."*
   4. Open **View query** and confirm the `dt_epoch` predicates the tooltip is 
referring to.
   5. Set `PARTITION_FILTER_MAPPING: False` and reload: the Explore payload 
serializes `partition_filter_mapping` as `null` and no glyph renders.
   
   Verified end-to-end against a real partitioned Postgres table in Docker, 
including the flag-off case.
   
   ### Deviation from the mockup
   
   1d shows the tooltip ending in a clickable **View generated SQL →** link. 
This ships as static text pointing at *View query* instead: the tooltip hangs 
off a small hover glyph, so reaching a link inside it means traversing from the 
icon without dismissing the tooltip, and the View query action lives in the 
chart's `⋯` menu rather than anywhere the control panel can reach without new 
plumbing. Happy to add the link if the interaction is worth the wiring.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [x] Required feature flags: `PARTITION_FILTER_MAPPING`
   - [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
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to