tsreaper commented on a change in pull request #16511:
URL: https://github.com/apache/flink/pull/16511#discussion_r673619347



##########
File path: 
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/ScalarFunctionsTest.scala
##########
@@ -3433,31 +3433,31 @@ class ScalarFunctionsTest extends ScalarTypesTestBase {
       "2016-06-14 23:00:00.000")
     testSqlApi(
       "timestampadd(HOUR, -1, date '2016-06-15')",
-      "2016-06-14 23:00:00.000000")
+      "2016-06-14 23:00:00")
 
     // There is no timestamp literal function in Java String Table API,
     // toTimestamp is casting string to TIMESTAMP(3) which is not the same to 
timestamp literal.
     testTableApi("2016-06-15".toTimestamp + 1.minute,
       "'2016-06-15'.toTimestamp + 1.minute",
       "2016-06-15 00:01:00.000")
     testSqlApi("timestampadd(MINUTE, 1, date '2016-06-15')",
-      "2016-06-15 00:01:00.000000")
+      "2016-06-15 00:01:00")
 
     // There is no timestamp literal function in Java String Table API,
     // toTimestamp is casting string to TIMESTAMP(3) which is not the same to 
timestamp literal.
     testTableApi("2016-06-15".toTimestamp - 1.second,
       "'2016-06-15'.toTimestamp - 1.second",
       "2016-06-14 23:59:59.000")
     testSqlApi("timestampadd(SQL_TSI_SECOND, -1, date '2016-06-15')",
-      "2016-06-14 23:59:59.000000")
+      "2016-06-14 23:59:59")
 
     // There is no timestamp literal function in Java String Table API,
     // toTimestamp is casting string to TIMESTAMP(3) which is not the same to 
timestamp literal.
     testTableApi("2016-06-15".toTimestamp + 1.second,
       "'2016-06-15'.toTimestamp + 1.second",
       "2016-06-15 00:00:01.000")
     testSqlApi("timestampadd(SECOND, 1, date '2016-06-15')",
-      "2016-06-15 00:00:01.000000")
+      "2016-06-15 00:00:01")

Review comment:
       OK, so for time / timestamp / timestamp_ltz + hour / minute / second we 
should leave the original precision unchanged, for other data types + hour / 
minute / second we should use the default timestamp precision.




-- 
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: issues-unsubscr...@flink.apache.org

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


Reply via email to