You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2020/04/07 23:57:41 UTC

[GitHub] [calcite] vineetgarg02 opened a new pull request #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)

vineetgarg02 opened a new pull request #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)
URL: https://github.com/apache/calcite/pull/1900
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] DonnyZone merged pull request #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)

Posted by GitBox <gi...@apache.org>.
DonnyZone merged pull request #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)
URL: https://github.com/apache/calcite/pull/1900
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] danny0405 commented on a change in pull request #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)

Posted by GitBox <gi...@apache.org>.
danny0405 commented on a change in pull request #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)
URL: https://github.com/apache/calcite/pull/1900#discussion_r405244213
 
 

 ##########
 File path: core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
 ##########
 @@ -1834,6 +1834,18 @@ private static String toSql(RelNode root, SqlDialect dialect) {
     sql(query).withMysql().ok(expected);
   }
 
+  @Test void testMySqlCastToTimestamp() {
+    //final String query = "select cast(\"hire_date\" as TIMESTAMP), \"employee_id\" "
+     //   + "from \"employee\" ";
+    //final String expected = "select cast(\"hire_date\" as DATE_TIME), \"employee_id\" "
 
 Review comment:
   Remove the comment

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] danny0405 commented on issue #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)

Posted by GitBox <gi...@apache.org>.
danny0405 commented on issue #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)
URL: https://github.com/apache/calcite/pull/1900#issuecomment-610738746
 
 
   Thanks for the fix @vineetgarg02 , let's give this patch a better commit message:
   "In JDBC adapter, when generating SQL for MYSQL, generate TIMESTAMP type as DATETIME for CAST"

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] vineetgarg02 commented on issue #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)

Posted by GitBox <gi...@apache.org>.
vineetgarg02 commented on issue #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)
URL: https://github.com/apache/calcite/pull/1900#issuecomment-611148690
 
 
   > Thanks for the fix @vineetgarg02 , let's give this patch a better commit message:
   > "In JDBC adapter, when generating SQL for MYSQL, generate TIMESTAMP type as DATETIME for CAST"
   
   @danny0405  Thanks for taking a look, i have addressed your comments/concerns.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] DonnyZone commented on issue #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)

Posted by GitBox <gi...@apache.org>.
DonnyZone commented on issue #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)
URL: https://github.com/apache/calcite/pull/1900#issuecomment-610711900
 
 
   I noticed that the timestamp type is supported in MySQL (https://dev.mysql.com/doc/refman/8.0/en/datetime.html).
   Is the `cast (x as timestamp)` not supported?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [calcite] vineetgarg02 commented on issue #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)

Posted by GitBox <gi...@apache.org>.
vineetgarg02 commented on issue #1900: [CALCITE-3733] MySQL JDBC rewrite should rewrite CAST as TIMESTAMP to CAST as DATETIME (Vineet Garg)
URL: https://github.com/apache/calcite/pull/1900#issuecomment-610734723
 
 
   > I noticed that the timestamp type is supported in MySQL (https://dev.mysql.com/doc/refman/8.0/en/datetime.html).
   > Is the `cast (x as timestamp)` not supported?
   
   @DonnyZone Yes `cast(x as timestamp)` is not supported in MySQL

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services