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


##########
core/src/main/java/org/apache/calcite/sql/dialect/MysqlSqlDialect.java:
##########
@@ -184,6 +185,46 @@ public MysqlSqlDialect(Context context) {
     return super.getCastSpec(type);
   }
 
+  /** {@inheritDoc}
+   *
+   * <p>MySQL format element reference:
+   * <a 
href="https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_date-format";>
+   * MySQL Date and Time Functions</a>.
+   */
+  @Override public String getFormatElement(FormatElementEnum fmtElement) {

Review Comment:
   Each dialect might have a different set of elements to represent the same 
type of datetime unit. 
   
   For example an abbreviated month name like `Jan` is `%b` in MySQL and `MON` 
in Snowflake. Each `SqlDialect` will have to override this method to supply the 
correct string for the element type. I only did MySQL, BigQuery, and Snowflake 
in the first commit because I wanted to get some feedback before working on 
each dialect.
   
   Oracle's format elements were chosen as the "base" set since they map 
closely to the SQL:2016 standard as described in 
[CALCITE-2980](https://issues.apache.org/jira/browse/CALCITE-2980).



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