Skip to content

[lance] Reject unsupported element types nested in ARRAY - #9102

Merged
JingsongLi merged 1 commit into
apache:masterfrom
jackylee-ch:lance-reject-nested-array
Aug 10, 2026
Merged

[lance] Reject unsupported element types nested in ARRAY#9102
JingsongLi merged 1 commit into
apache:masterfrom
jackylee-ch:lance-reject-nested-array

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

Purpose

LanceRowTypeVisitor.visit(ArrayType) returned without checking the element type, so
MULTISET / MAP / LOCAL_ZONED_TIMESTAMP passed validateDataFields when nested in an
ARRAY, even though the visitor rejects them at the top level and recurses through ROW.
ARRAY<MULTISET<...>> then failed at write time in
ArrowFieldTypeConversion.visit(MultisetType) instead of at CREATE TABLE.

Recurse into the element type, same as VortexFileFormat (#8690) and MosaicFileFormat.

Tests

LanceFileFormatTest — added a rejecting case for ARRAY<MULTISET<STRING>> and kept
ARRAY<ARRAY<INT>> passing. 7/7 pass; both fail without the fix.

LanceRowTypeVisitor.visit(ArrayType) returned without checking the
element type, so MULTISET/MAP/LOCAL_ZONED_TIMESTAMP passed
validateDataFields when nested in an ARRAY even though they are
rejected at the top level and inside ROW.
@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 3c43be6 into apache:master Aug 10, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants