Arunodoy18 opened a new pull request, #37698: URL: https://github.com/apache/superset/pull/37698
Fixes #23167 ### SUMMARY Fixes inconsistent application of dataset hours offset across different temporal query execution paths. Previously, the dataset hours offset was applied correctly when queries used the dataset default datetime column (`main_dttm_col`), but could be skipped or applied multiple times in other scenarios such as SQL expression temporal columns or time comparison queries. This could lead to incorrect time shifting in certain chart and dashboard contexts. This change ensures the dataset hours offset is applied consistently and exactly once regardless of the temporal column source or query transformation path. The fix is minimal and localized to the query construction layer and does not change dataset schema, configuration behavior, or temporal column metadata handling. --- ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Not applicable (query generation and time offset application behavior fix). --- ### TESTING INSTRUCTIONS Automated Tests: - Added tests verifying offset is applied when using dataset default datetime column - Added tests verifying offset is applied when using SQL expression temporal columns - Added tests ensuring offset is not double-applied in time comparison queries - Verified existing temporal query behavior remains unchanged Manual Verification: 1. Create dataset with hours offset configured 2. Create chart using dataset default datetime column and verify offset is applied correctly 3. Create chart using SQL expression temporal column and verify offset is applied correctly 4. Create chart with time comparison enabled (e.g. "1 day ago") and verify offset is applied only once 5. Test same scenarios in dashboard context --- ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #23167 - [ ] Required feature flags - [ ] Changes UI - [ ] Includes DB Migration - [ ] 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: [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]
