Airblader commented on a change in pull request #16594:
URL: https://github.com/apache/flink/pull/16594#discussion_r677232489
##########
File path:
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/table/catalog/hive/HiveCatalogITCase.java
##########
@@ -157,37 +155,27 @@ public void testCsvTableViaAPI() throws Exception {
tableEnv.registerCatalog("myhive", hiveCatalog);
tableEnv.useCatalog("myhive");
- TableSchema schema =
+ final TableSchema schema =
TableSchema.builder()
.field("name", DataTypes.STRING())
.field("age", DataTypes.INT())
.build();
- FormatDescriptor format =
- new OldCsv().field("name", Types.STRING()).field("age",
Types.INT());
-
- CatalogTable source =
- new CatalogTableBuilder(
- new FileSystem()
- .path(
- this.getClass()
-
.getResource("/csv/test.csv")
- .getPath()),
- schema)
- .withFormat(format)
- .inAppendMode()
- .withComment("Comment.")
- .build();
+ final Map<String, String> sourceOptions = new HashMap<>();
+ sourceOptions.put("connector.type", "filesystem");
+ sourceOptions.put("connector.path",
getClass().getResource("/csv/test.csv").getPath());
+ sourceOptions.put("format.type", "csv");
+
+ CatalogTable source = new CatalogTableImpl(schema, sourceOptions,
"Comment.");
Review comment:
(I know this is deprecated, but it seems that the Hive implementation is
still very much expecting this old stack and I didn't want to touch this here)
--
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]