-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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(dataset): retain is_dttm if set on metadata sync #16776
Conversation
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 the quick fix!
For the case when the original temporal flag was inferred from db type instead of user selection, this change seems will also retain the flag, but maybe that's OK?
Yeah, I didn't think that would be a common need, but I'm open to changing that, too, if this is a typical scenario. Do you think it's common to want to disable temporal flags for temporal type columns? |
Codecov Report
@@ Coverage Diff @@
## master #16776 +/- ##
=======================================
Coverage 76.98% 76.98%
=======================================
Files 1007 1007
Lines 54186 54187 +1
Branches 7464 7465 +1
=======================================
+ Hits 41713 41714 +1
Misses 12233 12233
Partials 240 240
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Merging this as-is, we can do a follow-up PR if we want to further refine this behavior. |
I was more thinking of when some column changed from a datetime type to non datetime, the previously inferred is_dttm will be retained. But like I said, I think this case is also OK. It's much more likely to want to force a non-dttm to dttm than vice versa. |
CI seems to be so flaky we still have some time to iterate.. :D I wonder if this would be the best flow: If the column exists and the raw datatype has changed, reinfer This would have the drawback of disabling |
(cherry picked from commit 1d5100d)
SUMMARY
When syncing dataset metadata, the
is_dttm
flag is reset for columns that are not natively temporal (likeVARCHAR
that has a datetime format). This changes the logic so thatis_dttm
is only reset if it is unset and the new datatype would be natively identified as being temporal.Closes #16774
AFTER
metadata-after.mp4
BEFORE
metadata-before.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION