amansinha100 commented on code in PR #3216:
URL: https://github.com/apache/hive/pull/3216#discussion_r852312966


##########
ql/src/java/org/apache/hadoop/hive/ql/io/orc/FixAcidKeyIndex.java:
##########
@@ -180,7 +180,8 @@ public static AcidKeyIndexValidationResult 
validate(Configuration conf, Path inp
         RecordIdentifier recordIdentifier = new 
RecordIdentifier(lastTransaction, lastBucket, lastRowId);
         result.recordIdentifiers.add(recordIdentifier);
 
-        if (stripes.size() != keyIndex.length || keyIndex[i] == null || 
recordIdentifier.compareTo(keyIndex[i]) != 0) {
+        if (keyIndex == null || stripes.size() != keyIndex.length || 
keyIndex[i] == null

Review Comment:
   Since keyIndex is independent of the stripes,  the `if (keyIndex == null)` 
check can be done right after line 159  and the `result.isValid` set to false 
right then.  Otherwise, here we will be setting the flag repeatedly. The check 
here could be modified to 
   `if (result.isValid && (stipes.size() ...<original condition>))`



-- 
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]

Reply via email to