KurtYoung commented on a change in pull request #10268: 
[Flink-14599][table-planner-blink] Support precision of TimestampType in blink 
planner
URL: https://github.com/apache/flink/pull/10268#discussion_r348988308
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
 ##########
 @@ -893,6 +909,99 @@ class TemporalTypesTest extends ExpressionTestBase {
       "1437699600")
   }
 
+  @Test
+  def testHighPrecisionTimestamp(): Unit = {
+    // EXTRACT should support millisecond/microsecond/nanosecond
+    testSqlApi(
+      "EXTRACT(MILLISECOND FROM TIMESTAMP '1970-01-01 00:00:00.123456789')",
+      "123")
+    testSqlApi(
+      "EXTRACT(MICROSECOND FROM TIMESTAMP '1970-01-01 00:00:00.123456789')",
+      "123456")
+    testSqlApi(
+      "EXTRACT(NANOSECOND FROM TIMESTAMP '1970-01-01 00:00:00.123456789')",
+      "123456789")
+
+    // TIMESTAMPADD should support microsecond/nanosecond
+    // TODO:
+    //  (1970-01-01 00:00:00.123455789:TIMESTAMP(9), /INT(*(1:INTERVAL 
MICROSECOND, 1), 1000))
+    // testSqlApi(
+    //  "TIMESTAMPADD(MICROSECOND, 1, TIMESTAMP '1970-01-01 
00:00:00.123455789')",
+    //  "1970-01-01 00:00:00.123456789"
+    //)
+
+    // TIMESTAMPDIFF should support microsecond/nanosecond
+    // TODO:
 
 Review comment:
   create a jira and attach the jira number for this

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