tjbanghart commented on code in PR #3034:
URL: https://github.com/apache/calcite/pull/3034#discussion_r1080608342


##########
core/src/main/java/org/apache/calcite/sql/dialect/MysqlSqlDialect.java:
##########
@@ -240,6 +281,17 @@ public MysqlSqlDialect(Context context) {
       unparseListAggCall(writer, call, null, leftPrec, rightPrec);
       break;
 
+    case FORMAT_DATE:
+    case FORMAT_TIME:
+    case FORMAT_TIMESTAMP:
+    case FORMAT_DATETIME:
+      writer.print("DATE_FORMAT(");

Review Comment:
   Yeah that's open for discussion -- how to best swap a `FORMAT_TIMESTAMP` 
Google SQL style function call to any other dialect. Snowflake for example uses 
`TO_CHAR` or `TO_VARCHAR`. 
   
   Maybe a generic entry in `SqlKind` called `GOOGLE_SQL_DATETIME_FORMAT`?
   Could even be more generic like `DATETIME_FORMAT` and then each dialect 
would know how to unparse.



-- 
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: commits-unsubscr...@calcite.apache.org

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

Reply via email to