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

ipolyzos pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git


The following commit(s) were added to refs/heads/main by this push:
     new 69d03e191 [client][hotfix] Invoke `RowType#getFieldNames` only once in 
`ConverterCommons` (#1920)
69d03e191 is described below

commit 69d03e191c0583b5630fe109cd7664816ad16cc0
Author: Sergey Nuyanzin <[email protected]>
AuthorDate: Tue Nov 4 08:14:33 2025 +0100

    [client][hotfix] Invoke `RowType#getFieldNames` only once in 
`ConverterCommons` (#1920)
---
 .../java/org/apache/fluss/client/converter/ConverterCommons.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/fluss-client/src/main/java/org/apache/fluss/client/converter/ConverterCommons.java
 
b/fluss-client/src/main/java/org/apache/fluss/client/converter/ConverterCommons.java
index 4a1e99246..5f4f1b6c1 100644
--- 
a/fluss-client/src/main/java/org/apache/fluss/client/converter/ConverterCommons.java
+++ 
b/fluss-client/src/main/java/org/apache/fluss/client/converter/ConverterCommons.java
@@ -26,6 +26,7 @@ import java.math.BigDecimal;
 import java.util.Arrays;
 import java.util.EnumMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -67,15 +68,15 @@ final class ConverterCommons {
 
     static void validatePojoMatchesTable(PojoType<?> pojoType, RowType 
tableSchema) {
         Set<String> pojoNames = pojoType.getProperties().keySet();
-        Set<String> tableNames = new HashSet<>(tableSchema.getFieldNames());
-        if (!pojoNames.equals(tableNames)) {
+        List<String> fieldNames = tableSchema.getFieldNames();
+        if (!pojoNames.containsAll(fieldNames)) {
             throw new IllegalArgumentException(
                     String.format(
                             "POJO fields %s must exactly match table schema 
fields %s.",
-                            pojoNames, tableNames));
+                            pojoNames, fieldNames));
         }
         for (int i = 0; i < tableSchema.getFieldCount(); i++) {
-            String name = tableSchema.getFieldNames().get(i);
+            String name = fieldNames.get(i);
             DataType dt = tableSchema.getTypeAt(i);
             PojoType.Property prop = pojoType.getProperty(name);
             validateCompatibility(dt, prop);

Reply via email to