Skip to content

Commit 08c9648

Browse files
[hotfix] Use CatalogTableAdapter rather than CatalogTable.newBuilder in flink catalog. (#2275)
1 parent 34b7688 commit 08c9648

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/catalog/FlinkCatalog.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.apache.fluss.config.ConfigOptions;
2424
import org.apache.fluss.config.Configuration;
2525
import org.apache.fluss.exception.InvalidTableException;
26+
import org.apache.fluss.flink.adapter.CatalogTableAdapter;
2627
import org.apache.fluss.flink.lake.LakeFlinkCatalog;
2728
import org.apache.fluss.flink.procedure.ProcedureManager;
2829
import org.apache.fluss.flink.utils.CatalogExceptionUtils;
@@ -842,14 +843,11 @@ private CatalogTable wrapWithIndexes(CatalogTable table, TableInfo tableInfo) {
842843
if (!indexKeys.isEmpty()) {
843844
indexes.add(indexKeys);
844845
}
845-
return CatalogTable.newBuilder()
846-
.schema(withIndex(table.getUnresolvedSchema(), indexes))
847-
.comment(table.getComment())
848-
.partitionKeys(table.getPartitionKeys())
849-
.options(table.getOptions())
850-
.snapshot(table.getSnapshot().orElse(null))
851-
.distribution(table.getDistribution().orElse(null))
852-
.build();
846+
return CatalogTableAdapter.toCatalogTable(
847+
withIndex(table.getUnresolvedSchema(), indexes),
848+
table.getComment(),
849+
table.getPartitionKeys(),
850+
table.getOptions());
853851
}
854852

855853
private static boolean isPrefixList(List<String> fullList, List<String> prefixList) {

0 commit comments

Comments
 (0)