-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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: can't sync temporal flag on virtual table #19366
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19366 +/- ##
==========================================
- Coverage 66.58% 66.56% -0.02%
==========================================
Files 1676 1676
Lines 64176 64186 +10
Branches 6525 6525
==========================================
- Hits 42732 42728 -4
- Misses 19745 19759 +14
Partials 1699 1699
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up |
@jinghua-qa Ephemeral environment spinning up at http://34.217.79.231:8080. Credentials are |
ea924e1
to
d3cc6d6
Compare
I tested the PR locally, is temporal can be sync as expected, but when i save the changes, i saw error msg Screen.Recording.2022-03-30.at.1.34.07.PM.mov |
This is an unrelated issue with current PR. I have opened a separated PR to fix it. |
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.
Work as expected, LGTM
d3cc6d6
to
40c48e8
Compare
column: ResultSetColumnType = { | ||
"name": col.name, | ||
"type": db_type_str, | ||
"is_date": self.is_temporal(db_type_str), | ||
"is_dttm": self.is_temporal(db_type_str), |
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.
We should keep a consistent interface between the physical dataset and the virtual dataset.
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.
Love it, thanks for this fix + nice cleanup! In the long run I feel we should start moving types from superset/superset_typing.py
into the packages where they are most relevant (see e.g. superset/key_value/types.py
), but that can be done in a follow up (e.g. the one planned for physical columns)
sounds good! I will follow this pattern in future. |
Ephemeral environment shutdown and build artifacts deleted. |
(cherry picked from commit d954c3d)
(cherry picked from commit d954c3d)
(cherry picked from commit d954c3d)
🏷️ preset:2022.13 |
SUMMARY
Currently, the virtual table is unable to sync
is temporal
flag. This is due to theSupersetResultSet
responseis_date
instead ofis_dttm
. We should keep the physical table and virtual table have the same interface.In this PR also introduce a new type
superset.superset_typing.ResultSetColumnType
to guarantee type checking.I will address a separate PR to finish
PhysicalColumnType
.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before
be.unable.to.sync.temporal.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION