SharonCastel commented on issue #22390:
URL: https://github.com/apache/superset/issues/22390#issuecomment-1656631993

   > > I wrote the solution to this bug 5 months ago, the query should include 
the function parseDateTimeBestEffortOrNull on the filter value in order to have 
the compatible conversion to clickhouse datetime type. Sorry I cannot fix it 
myself on superset code that builds the query to clickhouse db..
   > 
   > @SharonCastel can you explain in a little more detail how you fixed this, 
and if not in the code, where you fixed it? Any leads on a fix and/or 
workaround would surely be appreciated.
   
   Hi! Sure! 
   when you take the query from superset and execute it directly on CH you can 
find the solution with the function parseDateTimeBestEffortOrNull. the filter 
box probably takes the date and padding it with the times zeros as a string:
   greaterOrEquals(posting_date, '2021-01-01 00:00:00.000000')
   now CH needs both operators to have the same type in order to compare them
   same issue with the TZ I believe...
   For me, the issue was column date type without time so by adding calculated 
column of the same just toDateTime fixed the issue. 
   CH is very sensitive to types even under the same family of dates... if you 
ask me this conversion should be done by superset on  either both:
   1. when configuring the data set - when signing the "Is temporal" for a 
column check the conversion there to one global type that will be all date, 
time and TZ like the calculated column I created that gave the simple solution 
for me @betodealmeida thanks!!
   2. when filtering by time,  convert both conversion operators to the same, I 
offered parseDateTimeBestEffortOrNull but maybe it wont work for the TZ issue 
so you need to try it.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to