ClickHouse: Nullable(DateTime) as time field throwing error in chart UI #17253
Unanswered
ravikishorer
asked this question in
Q&A / Help
Replies: 1 comment
-
I would use Datatypes without NULLABLE in Superset NULLABLE(DateTime) = DateTime I use as workaround (clickhouse.py)
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ClickHouse: Nullable(DateTime) as time field throwing error in create a new chart UI as the query it is generating contains time fields which have milli second precision and clickhouse couldn't convert them to date time.
Expected results
It should work correctly.
Actual results
Create chart area shows error when time field is present.
Screenshots
The field is identified correctly as a temporal field in the fields section of the chart UI
How to reproduce the bug
Environment
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
Query is becoming something like
SELECT COUNT(*) AS count FROM "default"."trainingReport" WHERE "Last_Published_Date__UTC_TimeZone_" >= '2021-05-10 00:00:00.000000' AND "Last_Published_Date__UTC_TimeZone_" < '2021-05-17 00:00:00.000000' ORDER BY count DESC LIMIT 10000;
https://github.com/apache/superset/blob/master/superset/db_engine_specs/clickhouse.py#L66 is the issue as the field type is Nullable(DateTime), no proper conversion is happening for the from and to dates as the function is simply checking for utils.TemporalType.DATE and utils.TemporalType.DATETIME.
Beta Was this translation helpful? Give feedback.
All reactions