-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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: TemporalWrapperType string representation #16614
Conversation
Codecov Report
@@ Coverage Diff @@
## master #16614 +/- ##
==========================================
- Coverage 76.73% 76.51% -0.22%
==========================================
Files 1003 1003
Lines 53875 53875
Branches 7289 7289
==========================================
- Hits 41343 41225 -118
- Misses 12292 12410 +118
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.
|
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, nice catch
* fix: TemporalWrapperType string representation * fix tests (cherry picked from commit 9de2196)
* fix: TemporalWrapperType string representation * fix tests
* fix: TemporalWrapperType string representation * fix tests
SUMMARY
Currently the temporal wrapper class used by the sqla model returns
Type[TypeEngine]
, although it should be returning an instantiatedTypeEngine
, which results in an incorrect string representation of the type object. This doesn't affect regular query generation (the types and instances can mostly be used interchangeably when writing SqlAlchemy code), but causes trouble in the Presto db engine spec here:superset/superset/db_engine_specs/presto.py
Lines 385 to 407 in 3fe2e6e
and more specifically here (notice how the expected data type for
data_type
istypes.TypeEngine
, notType[types.TypeEngine]
):superset/superset/db_engine_specs/presto.py
Lines 293 to 303 in 3fe2e6e
Without this fix the new test fails with the following error:
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION