apurtell commented on code in PR #2656:
URL: https://github.com/apache/phoenix/pull/2656#discussion_r4471930726


##########
phoenix-core-server/src/main/java/org/apache/phoenix/index/GlobalIndexChecker.java:
##########
@@ -237,6 +254,55 @@ private boolean shouldCreateUnverifiedRowFilter(Filter 
delegateFilter) {
       return delegateFilter != null && !indexMaintainer.isUncovered();
     }
 
+    /**
+     * Builds a new filter chain for a repair scan of one row. A filter object 
that two scanners
+     * share gets state from both scanners. For example, a skip scan filter 
can then issue a seek
+     * hint behind its previous hint. The new chain has the same structure as 
the filter chain of
+     * the main scan.
+     */
+    private Filter newSingleRowIndexScanFilter() throws IOException {
+      if (clientFilter != null && clientFilterProto == null) {
+        // The serialized form holds only the filter configuration, not the 
scan position. Thus
+        // one serialized form serves all repair scans. Repair is rare, so one 
parse for each
+        // repair scan is acceptable.
+        clientFilterProto = ProtobufUtil.toFilter(clientFilter);
+      }
+      Filter filter = null;
+      if (clientFilterProto != null) {
+        filter = 
shareDistinctPrefixFilter(ProtobufUtil.toFilter(clientFilterProto));

Review Comment:
   Good catch!



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

Reply via email to