-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
feat(explore): Druid data type conversion #13595
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13595 +/- ##
==========================================
- Coverage 77.29% 77.16% -0.13%
==========================================
Files 910 933 +23
Lines 46359 47386 +1027
Branches 5633 5928 +295
==========================================
+ Hits 35831 36566 +735
- Misses 10392 10672 +280
- Partials 136 148 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
superset/db_engine_specs/druid.py
Outdated
@@ -38,6 +52,14 @@ class DruidEngineSpec(BaseEngineSpec): # pylint: disable=abstract-method | |||
allows_joins = False | |||
allows_subqueries = True | |||
|
|||
column_type_mappings = ( | |||
( | |||
re.compile(r"^__time", re.IGNORECASE), |
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.
It's actually the column name that is __type
, not the type. So this needs to be picked up in get_column_spec
, probably by adding the column name to the signature.
col = TableColumn(column_name="__time", type=column_spec.sqla_type, table=tbl) | ||
self.assertTrue(col) |
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.
What is the purpose of this assertion? Also, the type of the type
field on BaseColumn
and the child class TableColumn
is String(32)
, i.e. should not be passed a sqla column type.
Co-authored-by: Ville Brofeldt <[email protected]>
Co-authored-by: Ville Brofeldt <[email protected]>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
Closing this as new work in this area has made this PR redundant. |
SUMMARY
Data type conversion for Apache Druid engine spec. This is an addition to the base implementation of data type conversion project.
#13294
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION