private static TagOrBranchInfo buildTagOrBranchInfo(String name, SnapshotRef snapshotRef) {
    String type = null;
    if (snapshotRef.isTag()) {
      type = TagOrBranchInfo.TAG;
    } else if (snapshotRef.isBranch()) {
      type = TagOrBranchInfo.BRANCH;
    } else {
      throw new RuntimeException("Invalid snapshot ref: " + snapshotRef);
    }
    return new TagOrBranchInfo(
        name,
        snapshotRef.snapshotId(),
        snapshotRef.minSnapshotsToKeep(),
        snapshotRef.maxSnapshotAgeMs(),
        snapshotRef.maxRefAgeMs(),
        type);
  }
Construct ColumnInfo based on schema and primary key field.
amoro-ams/src/main/java/org/apache/amoro/server/dashboard/MixedAndIcebergTableDescriptor.java