docete 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_r369422152
##########
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:
Currently toTimestamp in Table API can't align to Timestamp literal, because
it use `SqlTimeTypeInfo.TIMESTAMP` as the target type.
----------------------------------------------------------------
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