virajjasani commented on code in PR #1832:
URL: https://github.com/apache/phoenix/pull/1832#discussion_r1501117217


##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/BloomFilterIT.java:
##########
@@ -0,0 +1,227 @@
+package org.apache.phoenix.end2end;

Review Comment:
   ASF lincense



##########
phoenix-core-client/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java:
##########
@@ -936,7 +938,17 @@ private ScansWithRegionLocations getParallelScans(byte[] 
startKey, byte[] stopKe
         if (!isLocalIndex && scanRanges.isPointLookup() && 
!scanRanges.useSkipScanFilter()) {
             List<List<Scan>> parallelScans = 
Lists.newArrayListWithExpectedSize(1);
             List<Scan> scans = Lists.newArrayListWithExpectedSize(1);
-            scans.add(context.getScan());
+            Scan scanFromContext = context.getScan();
+            if (scanRanges.getPointLookupCount() == 1) {
+                // leverage bloom filter for single key point lookup by 
turning scan to Get Scan#isGetScan()
+                try {
+                    scanFromContext = new Scan(context.getScan());
+                } catch (IOException e) {
+                    throw new PhoenixIOException(e);
+                }
+                scanFromContext.withStopRow(scanFromContext.getStartRow(), 
scanFromContext.includeStartRow());
+            }

Review Comment:
   Can we directly change stopRow without copying the Scan object?
   
   ```
               if (scanRanges.getPointLookupCount() == 1) {
                   // leverage bloom filter for single key point lookup by 
turning scan to Get Scan#isGetScan()
                   scanFromContext.withStopRow(scanFromContext.getStartRow(), 
scanFromContext.includeStartRow());
               }
   ```



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