dhruv-techdev commented on PR #45435:
URL: https://github.com/apache/superset/pull/45435#issuecomment-6278401559

   Thanks for the review, @sadpandajoe  good question. The existing Hive tests 
didn't cover the WEEK grain, so I've added 
test_week_time_grain_buckets_to_monday in 
tests/unit_tests/db_engine_specs/test_hive.py.
   
   Since the unit tests can't run against a real Hive, the test evaluates the 
spec's actual WEEK expression on SQLite, with small Python stand-ins for 
unix_timestamp, from_unixtime, date_sub and date_format that follow Hive's 
semantics ('u' = ISO day of week). It checks that every day over two weeks maps 
to that week's Monday. It fails against the previous expression (2025-01-06 → 
2024-12-31) and passes with this change.
   
   If you'd prefer a different approach, such as a simple assertion on the 
expression or coverage in the Hive integration tests, I'm happy to adjust. 
Please let me know if there's anything else you'd like me to change. Thanks 
again!


-- 
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