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 3c43be6d88 [lance] Reject unsupported element types nested in ARRAY
(#9102)
3c43be6d88 is described below
commit 3c43be6d88feef2a0781eb8e03af412a4db9ebd8
Author: jackylee <[email protected]>
AuthorDate: Mon Aug 10 16:48:43 2026 +0800
[lance] Reject unsupported element types nested in ARRAY (#9102)
---
.../org/apache/paimon/format/lance/LanceFileFormat.java | 2 +-
.../apache/paimon/format/lance/LanceFileFormatTest.java | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git
a/paimon-lance/src/main/java/org/apache/paimon/format/lance/LanceFileFormat.java
b/paimon-lance/src/main/java/org/apache/paimon/format/lance/LanceFileFormat.java
index 52184ad798..05005432b6 100644
---
a/paimon-lance/src/main/java/org/apache/paimon/format/lance/LanceFileFormat.java
+++
b/paimon-lance/src/main/java/org/apache/paimon/format/lance/LanceFileFormat.java
@@ -190,7 +190,7 @@ public class LanceFileFormat extends FileFormat {
@Override
public Void visit(ArrayType arrayType) {
- return null;
+ return arrayType.getElementType().accept(this);
}
@Override
diff --git
a/paimon-lance/src/test/java/org/apache/paimon/format/lance/LanceFileFormatTest.java
b/paimon-lance/src/test/java/org/apache/paimon/format/lance/LanceFileFormatTest.java
index ab63fc91ac..2352be764f 100644
---
a/paimon-lance/src/test/java/org/apache/paimon/format/lance/LanceFileFormatTest.java
+++
b/paimon-lance/src/test/java/org/apache/paimon/format/lance/LanceFileFormatTest.java
@@ -63,6 +63,22 @@ public class LanceFileFormatTest {
assertThrows(UnsupportedOperationException.class, () ->
format.validateDataFields(rowType));
}
+ @Test
+ public void testValidateDataFields_UnsupportedTypeNestedInArray() {
+ LanceFileFormat format =
+ new LanceFileFormat(new FileFormatFactory.FormatContext(new
Options(), 1024, 1024));
+ RowType rowType =
RowType.of(DataTypes.ARRAY(DataTypes.MULTISET(DataTypes.STRING())));
+ assertThrows(UnsupportedOperationException.class, () ->
format.validateDataFields(rowType));
+ }
+
+ @Test
+ public void testValidateDataFields_SupportedTypeNestedInArray() {
+ LanceFileFormat format =
+ new LanceFileFormat(new FileFormatFactory.FormatContext(new
Options(), 1024, 1024));
+ RowType rowType =
RowType.of(DataTypes.ARRAY(DataTypes.ARRAY(DataTypes.INT())));
+ assertDoesNotThrow(() -> format.validateDataFields(rowType));
+ }
+
@Test
public void testValidateDataFields_SupportedTypes() {
LanceFileFormat format =