rusackas commented on PR #34513: URL: https://github.com/apache/superset/pull/34513#issuecomment-3857238285
## Updates Made I've rebased this PR on master and made an improvement to address @giftig's feedback about user-friendly interval display. ### Key Change: Milliseconds Instead of Seconds INTERVAL values are now converted to **milliseconds** instead of seconds. This enables users to apply Superset's built-in **`DURATION`** number format for human-readable display. **Before:** Raw numeric display like `95445` (seconds) **After with DURATION format:** `1d 2h 30m 45s` ### How to Use 1. Create a chart with a PostgreSQL INTERVAL metric 2. In the chart's "Customize" tab, set the **Number Format** to `DURATION` 3. The interval will display in human-readable format ### Available Duration Formats | Format | Example Output | |--------|----------------| | `DURATION` | `1d 2h 30m 45s` | | `DURATION_SUB` | `1d 2h 30m 45s 400µs` (with sub-ms) | | `DURATION_COL` | `26:30:45` (colon notation) | ### Other Improvements - Fixed type annotation to match MySQL pattern (`types.TypeEngine` instead of `Any`) - Updated tests and documentation This makes PostgreSQL INTERVAL values much more user-friendly in charts while maintaining numeric operations for aggregations. -- 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]
