matriv commented on a change in pull request #18524:
URL: https://github.com/apache/flink/pull/18524#discussion_r811766015
##########
File path:
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/LogicalTypeCastsTest.java
##########
@@ -254,39 +243,34 @@
new
StructuredAttribute("diff", new TinyIntType())))
.build(),
false,
- true
- },
+ true),
- // raw to binary
- {
- new RawType(Integer.class, IntSerializer.INSTANCE),
+ // raw to binary
+ Arguments.of(
+ new RawType<>(Integer.class, IntSerializer.INSTANCE),
new BinaryType(),
false,
- true
- },
- });
+ true),
+ // raw to binary
+ Arguments.of(
+ new RawType<>(Integer.class, IntSerializer.INSTANCE),
+ VarCharType.STRING_TYPE,
+ false,
+ true));
}
- @Parameter public LogicalType sourceType;
-
- @Parameter(1)
- public LogicalType targetType;
-
- @Parameter(2)
- public boolean supportsImplicit;
-
- @Parameter(3)
- public boolean supportsExplicit;
-
- @Test
- public void testImplicitCasting() {
+ @ParameterizedTest(name = "{index}: [From: {0}, To: {1}, Implicit: {2},
Explicit: {3}]")
Review comment:
This is 100% personal preference: How about moving the actual test
method on top of the class before the constructions of the parameterised
stream? It just feels more natural to see first the actual test, but again
that's my preference, no need to change.
--
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]