You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "hughhhh (via GitHub)" <gi...@apache.org> on 2023/04/12 20:14:09 UTC

[GitHub] [superset] hughhhh commented on a diff in pull request #23666: fix: presto CI failed test

hughhhh commented on code in PR #23666:
URL: https://github.com/apache/superset/pull/23666#discussion_r1164602335


##########
superset/models/helpers.py:
##########
@@ -1314,7 +1314,7 @@ def dttm_sql_literal(self, dttm: sa.DateTime, col_type: Optional[str]) -> str:
         if sql:
             return sql
 
-        return f'{dttm.strftime("%Y-%m-%d %H:%M:%S.%f")}'
+        return f"""'{dttm.strftime("%Y-%m-%d %H:%M:%S.%f")}'"""

Review Comment:
   So i was following a pattern i saw in the original `dttm_sql_literal`, right now the original is now an override for `SqlaTable` queries vs. `Query` queries
   
   https://github.com/apache/superset/blob/976e33330fa5e0ae4655a4011cee2eb642e12b1b/superset/connectors/sqla/models.py#L382



-- 
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-unsubscribe@superset.apache.org

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


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