wuchong commented on a change in pull request #10877: 
[FLINK-15602][table-planner-blink] Padding TIMESTAMP type to respect …
URL: https://github.com/apache/flink/pull/10877#discussion_r369509790
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
 ##########
 @@ -795,8 +794,8 @@ class TemporalTypesTest extends ExpressionTestBase {
   def testTemporalShanghai(): Unit = {
     config.setLocalTimeZone(ZoneId.of("Asia/Shanghai"))
 
-    testSqlApi(timestampTz("2018-03-14 19:01:02.123"), "2018-03-14 
19:01:02.123")
-    testSqlApi(timestampTz("2018-03-14 19:00:00.010"), "2018-03-14 
19:00:00.01")
+    testSqlApi(timestampTz("2018-03-14 19:01:02.123"), "2018-03-14 
19:01:02.123000")
 
 Review comment:
   I mean we should improve `timestampTz` to convert timestamp without 
precision loss. 
   
   ```scala
   private def timestampTz(str: String) = {
     val precision = extractPrecision(str)
      s"CAST(TIMESTAMP '$str' AS TIMESTAMP($precision) WITH LOCAL TIME ZONE)"
   }
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to