gjacoby126 commented on a change in pull request #797:
URL: https://github.com/apache/phoenix/pull/797#discussion_r435622046



##########
File path: 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java
##########
@@ -1081,7 +1083,11 @@ private RegionScanner rebuildIndices(final RegionScanner 
innerScanner, final Reg
             rawScan.setRaw(true);
             rawScan.setMaxVersions();
             rawScan.getFamilyMap().clear();
-            rawScan.setFilter(null);
+            if (scan.getFilter() instanceof FirstKeyOnlyFilter) {

Review comment:
       Please add a comment to explain why FirstKeyOnlyFilter is a special 
case. If the rebuild index scan is explicitly asking for only the first 
keyvalue, why do we avoid using the AllVersions filter which also only gives 
the first keyvalue? 
   
   And if there is a reason not to use the FirstKeyOnlyFilter, are we still OK 
with using the AllVersionsIndexRebuildFilter if the Scan's filter it will 
delegate to is a composite filter which contains a FirstKeyOnlyFilter? 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to