Skip to content

Commit

Permalink
[AMORO-3263] Iceberg table format displays primary key information (#…
Browse files Browse the repository at this point in the history
…3264)

[AMORO-3263] Iceberg table format displays primary key information normally
  • Loading branch information
zhongqishang authored Oct 17, 2024
1 parent 5f93858 commit 5796284
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -717,10 +717,13 @@ private ServerTableMeta getServerTableMeta(MixedTable table) {
.map(item -> buildColumnInfoFromPartitionSpec(table.spec().schema(), item))
.collect(Collectors.toList()));
}
} else {
serverTableMeta.setPkList(
serverTableMeta.getSchema().stream()
.filter(s -> table.schema().identifierFieldNames().contains(s.getField()))
.collect(Collectors.toList()));
}
if (serverTableMeta.getPkList() == null) {
serverTableMeta.setPkList(new ArrayList<>());
}

return serverTableMeta;
}

Expand Down

0 comments on commit 5796284

Please sign in to comment.