mirror of https://github.com/apache/superset.git
Removed __time column from druid metadata refresh, added long and double schema support (#2911)
* Removed __time column from load, added long/double schema support * Format fix
This commit is contained in:
parent
737db25b6e
commit
e0dd5d9d1d
|
@ -603,6 +603,9 @@ class DruidDatasource(Model, BaseDatasource):
|
|||
logging.error("Failed at fetching the latest segment")
|
||||
return
|
||||
for col in cols:
|
||||
# Skip the time column
|
||||
if col == "__time":
|
||||
continue
|
||||
col_obj = (
|
||||
session
|
||||
.query(DruidColumn)
|
||||
|
@ -618,6 +621,11 @@ class DruidDatasource(Model, BaseDatasource):
|
|||
col_obj.filterable = True
|
||||
if datatype == "hyperUnique" or datatype == "thetaSketch":
|
||||
col_obj.count_distinct = True
|
||||
# If long or double, allow sum/min/max
|
||||
if datatype == "LONG" or datatype == "DOUBLE":
|
||||
col_obj.sum = True
|
||||
col_obj.min = True
|
||||
col_obj.max = True
|
||||
if col_obj:
|
||||
col_obj.type = cols[col]['type']
|
||||
session.flush()
|
||||
|
|
Loading…
Reference in New Issue