Closed Usiel closed 1 year ago
@Usiel I think there's a conflict between this patch and your other one. Could you fix it up please?
@Usiel I think there's a conflict between this patch and your other one. Could you fix it up please?
Rebased on master, thanks for the reviews!
Druid 0.23.0 returns more granular types in the
INFORMATION_SCHEMA.COLUMNS
DATA_TYPE
column (see PR on Druid here). This breaks the theget_columns
method in theDruidDialect
class, as it doesn't know what to do with values like"Complex<thetaSketch>"
, which previously used to be returned withDATA_TYPE="OTHER"
.With this suggested change we instead use the JDBC types Druid provides and map them to the sqlalchemy types. This has the advantage that Druid can figure out the mapping of the complex types and we just consume what Druid tells us, so hopefully this makes the mapping more resistant to future changes on the Druid side.
FYI this bug breaks Superset, it is not possible to add Datasets with complex columns when using Druid 0.23.0.
How to reproduce the issue
get_columns(...)
, which fails without this PR (KeyError: 'complex<thetasketch>'
)Expected: With the new code the reflection works and complex metrics are mapped to
BLOB
.