aminghadersohi commented on code in PR #44700:
URL: https://github.com/apache/superset/pull/44700#discussion_r4140648036


##########
superset/db_engine_specs/datafusion.py:
##########
@@ -84,9 +90,13 @@ def convert_dttm(
     ) -> str | None:
         sqla_type = cls.get_sqla_column_type(target_type)
 
-        if isinstance(sqla_type, types.Date):
-            return f"TO_DATE('{dttm.date().isoformat()}', 'YYYY-MM-DD')"
+        # DataFusion's to_timestamp()/to_date() take chrono format strings, not
+        # Oracle/PostgreSQL ones, so render ANSI typed literals instead.
+        if isinstance(sqla_type, types.Date) and not isinstance(
+            sqla_type, types.DateTime
+        ):

Review Comment:
   Fixed in 5c790582ca51e8ac64380f686691b59949e617d8: removed the redundant 
DateTime guard and corrected the PR description. Date/DateTime/TIMESTAMP and 
uppercase-name cases pass (22 tests).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to