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

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


The following commit(s) were added to refs/heads/master by this push:
     new bbf4045ba6 [hive] Correct column.name.delimiter property key in 
HiveSchema (#8641)
bbf4045ba6 is described below

commit bbf4045ba6863141714a8e4fc96217fb608da801
Author: Eunbin Son <[email protected]>
AuthorDate: Wed Jul 15 19:13:52 2026 +0900

    [hive] Correct column.name.delimiter property key in HiveSchema (#8641)
---
 .../java/org/apache/paimon/hive/HiveSchema.java    |  2 +-
 .../apache/paimon/hive/HiveTableSchemaTest.java    | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git 
a/paimon-hive/paimon-hive-connector-common/src/main/java/org/apache/paimon/hive/HiveSchema.java
 
b/paimon-hive/paimon-hive-connector-common/src/main/java/org/apache/paimon/hive/HiveSchema.java
index cf6cbd49d1..382119a25e 100644
--- 
a/paimon-hive/paimon-hive-connector-common/src/main/java/org/apache/paimon/hive/HiveSchema.java
+++ 
b/paimon-hive/paimon-hive-connector-common/src/main/java/org/apache/paimon/hive/HiveSchema.java
@@ -116,7 +116,7 @@ public class HiveSchema {
                 properties.getProperty(
                         // serdeConstants.COLUMN_NAME_DELIMITER is not defined 
in earlier Hive
                         // versions, so we use a constant string instead
-                        "column.name.delimite", 
String.valueOf(SerDeUtils.COMMA));
+                        "column.name.delimiter", 
String.valueOf(SerDeUtils.COMMA));
 
         List<String> columnNames = 
Arrays.asList(columnProperty.split(columnNameDelimiter));
         String columnTypes =
diff --git 
a/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/HiveTableSchemaTest.java
 
b/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/HiveTableSchemaTest.java
index fe7aeac083..62e11e6df1 100644
--- 
a/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/HiveTableSchemaTest.java
+++ 
b/paimon-hive/paimon-hive-connector-common/src/test/java/org/apache/paimon/hive/HiveTableSchemaTest.java
@@ -101,6 +101,29 @@ public class HiveTableSchemaTest {
                 .isEqualTo(Arrays.asList("col1 comment", "col2 comment", "col3 
comment"));
     }
 
+    @Test
+    public void testExtractSchemaWithCustomColumnNameDelimiter() {
+        // Column names are split with a custom delimiter (not the default 
comma).
+        // This requires the "column.name.delimiter" property key to be 
honored.
+        List<String> columns = Arrays.asList("a", "b", "c");
+        Properties properties = new Properties();
+        properties.setProperty("columns", String.join(";", columns));
+        properties.setProperty("column.name.delimiter", ";");
+        properties.setProperty(
+                "columns.types",
+                String.join(
+                        ":",
+                        Arrays.asList(
+                                TypeInfoFactory.intTypeInfo.getTypeName(),
+                                TypeInfoFactory.stringTypeInfo.getTypeName(),
+                                TypeInfoFactory.getDecimalTypeInfo(5, 
3).getTypeName())));
+        properties.setProperty("columns.comments", "\0\0");
+        properties.setProperty("location", tempDir.toString());
+
+        HiveSchema schema = HiveSchema.extract(null, properties);
+        assertThat(schema.fieldNames()).isEqualTo(columns);
+    }
+
     @Test
     public void testExtractSchemaWithExistsDDLAndExistsPaimonTable() throws 
Exception {
         // create a paimon table

Reply via email to