vibhatha commented on code in PR #41636:
URL: https://github.com/apache/arrow/pull/41636#discussion_r1600848552
##########
java/vector/src/main/java/org/apache/arrow/vector/compare/RangeEqualsVisitor.java:
##########
@@ -450,6 +454,82 @@ protected boolean
compareBaseLargeVariableWidthVectors(Range range) {
return true;
}
+ protected boolean compareBaseVariableWidthViewVectors(Range range) {
+ BaseVariableWidthViewVector leftVector = (BaseVariableWidthViewVector)
left;
+ BaseVariableWidthViewVector rightVector = (BaseVariableWidthViewVector)
right;
+
+ final ArrowBuf leftViewBuffer = leftVector.getDataBuffer();
+ final ArrowBuf rightViewBuffer = rightVector.getDataBuffer();
+
+ final int elementSize = BaseVariableWidthViewVector.ELEMENT_SIZE;
+ final int lengthWidth = BaseVariableWidthViewVector.LENGTH_WIDTH;
+ final int prefixWidth = BaseVariableWidthViewVector.PREFIX_WIDTH;
+ final int bufIndexWidth = BaseVariableWidthViewVector.BUF_INDEX_WIDTH;
+
+ List<ArrowBuf> leftDataBuffers = leftVector.getDataBuffers();
+ List<ArrowBuf> rightDataBuffers = rightVector.getDataBuffers();
+
+ for (int i = 0; i < range.getLength(); i++) {
+ int leftIndex = range.getLeftStart() + i;
+ int rightIndex = range.getRightStart() + i;
+
+ boolean isNull = leftVector.isNull(leftIndex);
+ if (isNull != rightVector.isNull(rightIndex)) {
+ return false;
+ }
+
+ if (!isNull) {
Review Comment:
@lidavidm there was an unnecessary looping happened. So I added this. Sorry
I missed this earlier.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]