You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@amoro.apache.org by ji...@apache.org on 2024/10/17 07:34:25 UTC

(amoro) branch master updated: [AMORO-3263] Iceberg table format displays primary key information (#3264)

This is an automated email from the ASF dual-hosted git repository.

jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/master by this push:
     new 579628424 [AMORO-3263] Iceberg table format displays primary key information (#3264)
579628424 is described below

commit 579628424aaad4b8b3f59b5015b652a05634a48b
Author: Qishang Zhong <zh...@gmail.com>
AuthorDate: Thu Oct 17 15:34:21 2024 +0800

    [AMORO-3263] Iceberg table format displays primary key information (#3264)
    
    [AMORO-3263] Iceberg table format displays primary key information normally
---
 .../amoro/server/dashboard/MixedAndIcebergTableDescriptor.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/amoro-ams/src/main/java/org/apache/amoro/server/dashboard/MixedAndIcebergTableDescriptor.java b/amoro-ams/src/main/java/org/apache/amoro/server/dashboard/MixedAndIcebergTableDescriptor.java
index 1bacd81a1..6d499259a 100644
--- a/amoro-ams/src/main/java/org/apache/amoro/server/dashboard/MixedAndIcebergTableDescriptor.java
+++ b/amoro-ams/src/main/java/org/apache/amoro/server/dashboard/MixedAndIcebergTableDescriptor.java
@@ -717,10 +717,13 @@ public class MixedAndIcebergTableDescriptor extends PersistentBase
                 .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;
   }