[improvement](show snapshot) show iceberg snapshot print summary info (#27448)

Iceberg's snapshot has summary information, but Doris did not display it. This patch fixes this issue.
This commit is contained in:
HB
2023-11-27 20:56:50 +08:00
committed by GitHub
parent 3d7d166355
commit c7b9a32e3e
4 changed files with 27 additions and 25 deletions

View File

@ -58,7 +58,8 @@ public class IcebergTableValuedFunction extends MetadataTableValuedFunction {
new Column("parent_id", PrimitiveType.BIGINT, false),
new Column("operation", PrimitiveType.STRING, false),
// todo: compress manifest_list string
new Column("manifest_list", PrimitiveType.STRING, false));
new Column("manifest_list", PrimitiveType.STRING, false),
new Column("summary", PrimitiveType.STRING, false));
private static final ImmutableMap<String, Integer> COLUMN_TO_INDEX;

View File

@ -156,6 +156,7 @@ public class MetadataGenerator {
}
trow.addToColumnValue(new TCell().setStringVal(snapshot.operation()));
trow.addToColumnValue(new TCell().setStringVal(snapshot.manifestListLocation()));
trow.addToColumnValue(new TCell().setStringVal(new Gson().toJson(snapshot.summary())));
dataBatch.add(trow);
}