-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Time Offset in SQLite and refine logic in Date Type conversion #21378
fix: Time Offset in SQLite and refine logic in Date Type conversion #21378
Conversation
Codecov Report
@@ Coverage Diff @@
## master #21378 +/- ##
==========================================
+ Coverage 66.67% 66.68% +0.01%
==========================================
Files 1791 1791
Lines 68458 68476 +18
Branches 7270 7270
==========================================
+ Hits 45642 45661 +19
+ Misses 20955 20954 -1
Partials 1861 1861
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
69f2687
to
5df12e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested to work as expected. I left one last comment that I'd be curious to hear your thoughts on, but this is probably already ok for merging to unblock the fix which is more serious than the remaining comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for all the iterations on this one!
e1e8daf
to
d3518c2
Compare
* fix(chart): fix time comparison error (#13) * fix: use dttm_col name to normalize dttm_col to fix time comparison error * Revert "fix(chart): fix time comparison error (#13)" This reverts commit b3dacc1. * fix: Time Offset in SQLite and refine logic in Date Type conversion (apache#21378) * fix another bug in cherry-pick * fix test --------- Co-authored-by: Yongjie Zhao <yongjiezhao@apache.org>
SUMMARY
Currently, The Time Offset can't be used in SQLite as datasouce, it's because the Pandas + SQLAlchemy query from SQLite will return
datetime
column asobject
rather thandatetime
.This PR uses the original
normalize_dttm_col
function but adds a new argument for it. thenormalize_dttm_col
will convert the old__timestamp
column or the newBASE_AXIS
to the Timestamp series in pandas.In addition, added a new unit test for Time Grain and Time Offset in the QueryObject.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After
FF Enabled
FF Disabled
Before
FF Enabled
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION