kasakrisz commented on a change in pull request #2970:
URL: https://github.com/apache/hive/pull/2970#discussion_r792335168
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/io/parquet/vector/VectorizedListColumnReader.java
##########
@@ -500,22 +501,37 @@ private boolean
compareDecimalColumnVector(DecimalColumnVector cv1, DecimalColum
private boolean compareBytesColumnVector(BytesColumnVector cv1,
BytesColumnVector cv2) {
int length1 = cv1.vector.length;
int length2 = cv2.vector.length;
- if (length1 == length2) {
- for (int i = 0; i < length1; i++) {
- int innerLen1 = cv1.vector[i].length;
- int innerLen2 = cv2.vector[i].length;
- if (innerLen1 == innerLen2) {
- for (int j = 0; j < innerLen1; j++) {
- if (cv1.vector[i][j] != cv2.vector[i][j]) {
- return false;
- }
- }
- } else {
+ if (length1 != length2) {
+ return false;
+ }
+
+ for (int i = 0; i < length1; i++) {
+ // check for different nulls
+ if (columnVectorsDifferNullForSameIndex(cv1, cv2, i)) {
+ return false;
+ }
+
+ // if they are both null, continue
+ // else if one of them is null, return false
+ if (cv1.isNull[i] && cv2.isNull[i]) {
+ continue;
+ } else if (cv1.isNull[i] || cv2.isNull[i]) {
Review comment:
This check seems to be unnecessary because it is already handled by
```
if (columnVectorsDifferNullForSameIndex(cv1, cv2, i)) {
return false;
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]