Github user ankitsinghal commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/147#discussion_r49932700
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java 
---
    @@ -510,14 +532,18 @@ private static String toString(List<byte[]> gps) {
                     endRegionKey = regionInfo.getEndKey();
                     keyOffset = 
ScanUtil.getRowKeyOffset(regionInfo.getStartKey(), endRegionKey);
                 }
    -            while (guideIndex < gpsSize
    -                    && (Bytes.compareTo(currentGuidePost = 
gps.get(guideIndex), endKey) <= 0 || endKey.length == 0)) {
    -                Scan newScan = scanRanges.intersectScan(scan, currentKey, 
currentGuidePost, keyOffset, false);
    -                scans = addNewScan(parallelScans, scans, newScan, 
currentGuidePost, false, regionLocation);
    -                currentKey = currentGuidePost;
    -                guideIndex++;
    -            }
    -            Scan newScan = scanRanges.intersectScan(scan, currentKey, 
endKey, keyOffset, true);
    +            try {
    +                while (guideIndex < gpsSize && 
(currentGuidePost.compareTo(endKey) <= 0 || endKey.length == 0)) {
    +                    Scan newScan = scanRanges.intersectScan(scan, 
currentKeyBytes, currentGuidePostBytes, keyOffset,
    +                            false);
    +                    scans = addNewScan(parallelScans, scans, newScan, 
currentGuidePostBytes, false, regionLocation);
    +                    currentKeyBytes = currentGuidePost.copyBytes();
    +                    currentGuidePost = CodecUtils.decode(decoder, input);
    +                    currentGuidePostBytes = currentGuidePost.copyBytes();
    --- End diff --
    
    same as above. As all are using the same byte[] object which the decoder is 
using.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to