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_r368274102
########## File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/MapTypeTest.scala ########## @@ -85,13 +85,14 @@ class MapTypeTest extends MapTypeTestBase { "MAP[DATE '1985-04-11', TIME '14:15:16', DATE '2018-07-26', TIME '17:18:19']", "{1985-04-11=14:15:16, 2018-07-26=17:18:19}") - testAllApis( + testTableApi( map(valueLiteral(gLocalTime("14:15:16")), valueLiteral(localDateTime("1985-04-11 14:15:16")), valueLiteral(gLocalTime("17:18:19")), valueLiteral(localDateTime("2018-07-26 17:18:19"))), - "map('14:15:16'.toTime, '1985-04-11 14:15:16'.toTimestamp, " + - "'17:18:19'.toTime, '2018-07-26 17:18:19'.toTimestamp)", + "{14:15:16=1985-04-11 14:15:16, 17:18:19=2018-07-26 17:18:19}") + + testSqlApi( "MAP[TIME '14:15:16', TIMESTAMP '1985-04-11 14:15:16', " + - "TIME '17:18:19', TIMESTAMP '2018-07-26 17:18:19']", + "TIME '17:18:19', TIMESTAMP '2018-07-26 17:18:19']", Review comment: I find that we have a lot of this changes that remove the `toTimestamp` from the tests. I'm wondering could we align the `toTimestamp` with the SQL timestmap literal? Currently `"2018-07-26 17:18:19".toTimestamp` actually calls `"2018-07-26 17:18:19".cast(DataTypes.TIMESTAMP(3))`, however, according to the javadoc of `toTimestamp`, it should be the same with SQL `TIMESTAMP string`. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services