matriv commented on a change in pull request #18027:
URL: https://github.com/apache/flink/pull/18027#discussion_r763814380
##########
File path:
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/functions/CastFunctionITCase.java
##########
@@ -1049,51 +1052,14 @@ protected Configuration configuration() {
// .fromCase(INTERVAL(DAY()), Duration.ofDays(300),
Period.of(0, 0, 0))
// .fromCase(INTERVAL(DAY()), Duration.ofDays(400),
Period.of(1, 0, 0))
// .fromCase(INTERVAL(HOUR()), Duration.ofDays(400),
Period.of(1, 0, 0))
- .build(),
+ .build()
// CastTestSpecBuilder
// .testCastTo(INTERVAL(DAY()))
// https://issues.apache.org/jira/browse/FLINK-24426 allow
cast from string
// .fromCase(STRING(), "+41 10:17:36.789", Duration.of(...))
// https://issues.apache.org/jira/browse/FLINK-24428
// .build()
- CastTestSpecBuilder.testCastTo(ARRAY(INT()))
- .fromCase(ARRAY(INT()), null, null)
- // https://issues.apache.org/jira/browse/FLINK-17321
- // .fromCase(ARRAY(STRING()), new String[] {'1', '2',
'3'}, new Integer[]
- // {1, 2, 3})
- // https://issues.apache.org/jira/browse/FLINK-24425
Cast from corresponding
- // single type
- // .fromCase(INT(), DEFAULT_POSITIVE_INT, new int[]
{DEFAULT_POSITIVE_INT})
- .fromCase(ARRAY(INT()), new int[] {1, 2, 3}, new
Integer[] {1, 2, 3})
- .build(),
- CastTestSpecBuilder.testCastTo(ARRAY(STRING().nullable()))
- .fromCase(
- ARRAY(TIMESTAMP(4).nullable()),
- new LocalDateTime[] {
-
LocalDateTime.parse("2021-09-24T12:34:56.123456"),
- null,
-
LocalDateTime.parse("2021-09-24T14:34:56.123456")
- },
- new String[] {
- "2021-09-24 12:34:56.1234", null,
"2021-09-24 14:34:56.1234"
- })
- .build(),
- CastTestSpecBuilder.testCastTo(ARRAY(BIGINT().nullable()))
- .fromCase(
- ARRAY(INT().nullable()),
- new Integer[] {1, null, 2},
- new Long[] {1L, null, 2L})
- .build(),
- CastTestSpecBuilder.testCastTo(ARRAY(BIGINT().notNull()))
- .fromCase(ARRAY(INT().notNull()), new Integer[] {1,
2}, new Long[] {1L, 2L})
- .build()
//
- // Cast to structuredTypes
Review comment:
Please include that in the extracted method
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]