rionmonster commented on code in PR #27553:
URL: https://github.com/apache/flink/pull/27553#discussion_r2788577699
##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/connector/file/table/FileSystemTableSourceTest.java:
##########
@@ -80,4 +89,93 @@ void testMetadataReading() {
util.verifyRelPlanInsert(
"insert into MySink(a, b, c) select a, b, filemeta from
MyTableWithMeta");
}
+
+ @ParameterizedTest(name = "extractFileName({0}) -> {1}")
+ @MethodSource("fileNameCases")
+ void testFileNameExtraction(String rawPath, String expected) {
+ String extractedFileName = FileSystemTableSource.extractFileName(new
Path(rawPath));
+ assertThat(extractedFileName).isEqualTo(expected);
+ }
+
+ @ParameterizedTest(name = "file.name accessor for {0}")
+ @MethodSource("fileNameCases")
+ void testFileNameMetadataAccessor(String rawPath, String expected) {
Review Comment:
Makes sense! I've gone ahead and converted this to a `testMetadataAccessor`
that accepts the info as one of the parameters and created a wrapper around the
previous separate test cases (e.g., `fileNameCases()` and `filePathCases()`) to
associate those with the appropriate types.
--
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]