Skip to content

Commit c7081c2

Browse files
committed
check list validity bit
1 parent b942794 commit c7081c2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

java/vector/src/main/java/org/apache/arrow/vector/complex/FixedSizeListVector.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,10 @@ public boolean equals(int index, ValueVector to, int toIndex) {
526526

527527
FixedSizeListVector that = (FixedSizeListVector) to;
528528

529+
if (this.isSet(index) != that.isSet(toIndex)) {
530+
return false;
531+
}
532+
529533
for (int i = 0; i < listSize; i++) {
530534
if (!vector.equals(index * listSize + i, that, toIndex * listSize + i)) {
531535
return false;

java/vector/src/main/java/org/apache/arrow/vector/complex/ListVector.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,11 @@ public boolean equals(int index, ValueVector to, int toIndex) {
435435
}
436436

437437
ListVector that = (ListVector) to;
438+
439+
if (this.isSet(index) != that.isSet(toIndex)) {
440+
return false;
441+
}
442+
438443
final int leftStart = offsetBuffer.getInt(index * OFFSET_WIDTH);
439444
final int leftEnd = offsetBuffer.getInt((index + 1) * OFFSET_WIDTH);
440445

0 commit comments

Comments
 (0)