Skip to content

[common] Read VECTOR fields from NestedRow - #9864

Merged
JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/common-nestedrow-vector-getter
Sep 17, 2026
Merged

JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/common-nestedrow-vector-getter

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

fix #9861

  • NestedRow.getVector still threw IllegalArgumentException("Unsupported type: VectorType"), so a primary-key table with a ROW<..., VECTOR> column failed at flush: the write buffer holds BinaryRow, and the Parquet/Avro writer reads the nested row via BinaryRow.getRow()NestedRow.getVector().
  • Implement it with MemorySegmentUtils.readVectorData, mirroring BinaryRow.getVector and BinaryArray.getVector; BinaryWriter.writeVector already writes the nested slot, so the layout is unchanged.
  • Lineage: add vector type definition and basic APIs / Implements #7204 added the stub to BinaryArray and NestedRow; [common] Support VECTOR elements in InternalArray accessors #9773 fixed BinaryArray; this fixes the last one.

Tests

  • Added NestedRowTest#testNestedRowWithVector: round-trip of ROW<INT, ROW<INT, VECTOR(3, FLOAT)>>, null vector field, InternalRow.createFieldGetter(VECTOR), and the multi-segment case. Fails with the stub exception without the fix.
  • mvn -pl paimon-common clean install (JDK 11): BUILD SUCCESS, 0 failures (checkstyle, spotless, enforcer included); NestedRowTest 4/4.

NestedRow.getVector still threw the "Unsupported type: VectorType" stub
left by apache#7204, so a primary-key table with a ROW<..., VECTOR> column failed
at flush when the format writer read the nested row. Mirror
BinaryRow.getVector / BinaryArray.getVector (apache#9773) with
MemorySegmentUtils.readVectorData.

Generated-by: Claude Code

@JingsongLi JingsongLi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the NestedRow VECTOR decoding path. Aligning it with the existing BinaryRow vector decoding preserves nested vector projection semantics instead of treating nested values as generic bytes. The implementation and coverage look good to me.

@JingsongLi
JingsongLi merged commit 599c728 into apache:master Sep 17, 2026
18 checks passed
@thswlsqls
thswlsqls deleted the fix/common-nestedrow-vector-getter branch September 18, 2026 23:58
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.

[Bug] NestedRow.getVector still throws "Unsupported type: VectorType" for nested VECTOR columns

2 participants