Skip to content

Commit

Permalink
delete no need test
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-024 committed Jan 8, 2025
1 parent bbe60b3 commit f3c1403
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 213 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,22 @@ public void beforeEach() throws IOException {
}

private ResolvedSchema createSchema() {
return FlinkCatalogTestUtil.createSchema();
return new ResolvedSchema(
Arrays.asList(
Column.physical("first", DataTypes.STRING()),
Column.physical("second", DataTypes.INT()),
Column.physical("third", DataTypes.STRING()),
Column.physical(
"four",
DataTypes.ROW(
DataTypes.FIELD("f1", DataTypes.STRING()),
DataTypes.FIELD("f2", DataTypes.INT()),
DataTypes.FIELD(
"f3",
DataTypes.MAP(
DataTypes.STRING(), DataTypes.INT()))))),
Collections.emptyList(),
null);
}

private List<String> createPartitionKeys() {
Expand Down Expand Up @@ -177,7 +192,14 @@ private CatalogTable createAnotherPartitionedTable(Map<String, String> options)
}

private CatalogTable createTable(Map<String, String> options) {
return FlinkCatalogTestUtil.createTable(options);
ResolvedSchema resolvedSchema = this.createSchema();
CatalogTable origin =
CatalogTable.of(
Schema.newBuilder().fromResolvedSchema(resolvedSchema).build(),
"test comment",
Collections.emptyList(),
options);
return new ResolvedCatalogTable(origin, resolvedSchema);
}

private CatalogTable createPartitionedTable(Map<String, String> options) {
Expand Down Expand Up @@ -342,7 +364,7 @@ public void testCreateFlinkTableWithPath() throws Exception {
@MethodSource("streamingOptionProvider")
public void testCreateTable_Streaming(Map<String, String> options) throws Exception {
catalog.createDatabase(path1.getDatabaseName(), null, false);
CatalogTable table = FlinkCatalogTestUtil.createTable(options);
CatalogTable table = this.createTable(options);
catalog.createTable(path1, table, false);
checkCreateTable(path1, table, (CatalogTable) catalog.getTable(path1));
}
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit f3c1403

Please sign in to comment.