Skip to content

Commit

Permalink
[ARROW-6738][Java] Rule out the change for union type comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
liyafan82 committed Jan 21, 2020
1 parent bab7402 commit c515393
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -217,7 +217,9 @@ protected boolean compareUnionVectors(Range range) {
return false;
}
}
RangeEqualsVisitor visitor = createInnerVisitor(leftSubVector, rightSubVector, true);
TypeEqualsVisitor typeVisitor = new TypeEqualsVisitor(rightSubVector);
RangeEqualsVisitor visitor =
createInnerVisitor(leftSubVector, rightSubVector, (left, right) -> typeVisitor.equals(left));
if (!visitor.rangeEquals(subRange)) {
return false;
}
Expand Down
Expand Up @@ -309,8 +309,8 @@ public void testUnionVectorSubRangeEquals() {
vector1.setSafe(2, intHolder);
vector1.setValueCount(3);

vector2.setType(0, Types.MinorType.SMALLINT);
vector2.setSafe(0, intHolder);
vector2.setType(0, Types.MinorType.UINT4);
vector2.setSafe(0, uInt4Holder);

vector2.setType(1, Types.MinorType.INT);
vector2.setSafe(1, intHolder);
Expand Down

0 comments on commit c515393

Please sign in to comment.