ravikishorer opened a new issue #14671: URL: https://github.com/apache/superset/issues/14671
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  #### How to reproduce the bug 1. Clickhouse create table ``` CREATE TABLE trainingReport ( Training_ID Int32, date Nullable(DateTime), ) ENGINE = MergeTree() ORDER BY tuple(); ``` 2. Try to create a chart with this dataset ### Environment - superset version: 1.1.0 - python version: 3.8.5 - node.js version: 12.18.3 ### Checklist Make sure to follow these steps before submitting your issue - thank you! - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any. - [x] I have reproduced the issue with at least the latest released version of superset. - [x] I have checked the issue tracker for the same issue and I haven't found one similar. ### 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. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
