Skip to content

[api] Fix VectorType#isPrunedFrom to compare vector length#8812

Merged
JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/vector-type-is-pruned-from-length
Jul 23, 2026
Merged

[api] Fix VectorType#isPrunedFrom to compare vector length#8812
JingsongLi merged 1 commit into
apache:masterfrom
thswlsqls:fix/vector-type-is-pruned-from-length

Conversation

@thswlsqls

Copy link
Copy Markdown
Contributor

Purpose

fix #8811

  • VectorType.isPrunedFrom recursed into the element type but ignored length, so VECTOR<FLOAT, 3> was reported as pruned from VECTOR<FLOAT, 5>.
  • Add the missing length == vectorType.length term, mirroring equalsIgnoreFieldId in the same class — equals and hashCode already include length.

Tests

  • Added VectorTypeTest#testIsPrunedFromRejectsDifferentLength (fails before the fix) and #testIsPrunedFromAcceptsSameElementTypeAndLength.
  • mvn -pl paimon-api clean install — BUILD SUCCESS on JDK 11, 105 tests passed (checkstyle, spotless, rat included).

@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 926ffb1 into apache:master Jul 23, 2026
13 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.

[Bug] VectorType#isPrunedFrom ignores vector length

2 participants