tkhurana commented on code in PR #1736:
URL: https://github.com/apache/phoenix/pull/1736#discussion_r1480436910
##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/GroupedAggregateRegionObserver.java:
##########
@@ -371,12 +425,32 @@ private static class UnorderedGroupByRegionScanner
extends BaseRegionScanner {
private final long pageSizeMs;
private RegionScanner regionScanner = null;
private final GroupByCache groupByCache;
+ private final Scan scan;
+ private final byte[] scanStartRowKey;
+ private final boolean includeStartRowKey;
+ private final byte[] prevScanStartRowKey;
+ private final Boolean prevScanIncludeStartRowKey;
+ private boolean firstScan = true;
+ private boolean updateScannerBasedOnPrevRowKey = false;
+ private byte[] lastReturnedRowKey = null;
private UnorderedGroupByRegionScanner(final
ObserverContext<RegionCoprocessorEnvironment> c,
final Scan scan, final
RegionScanner scanner, final List<Expression> expressions,
final ServerAggregators
aggregators, final long limit, final long pageSizeMs) {
super(scanner);
this.region = c.getEnvironment().getRegion();
+ this.scan = scan;
+ // If scan start rowkey is empty, use region boundaries. Reverse
region boundaries
+ // for reverse scan.
+ scanStartRowKey = scan.getStartRow().length > 0 ?
scan.getStartRow() :
+ (scan.isReversed() ? region.getRegionInfo().getEndKey() :
+ region.getRegionInfo().getStartKey());
+ includeStartRowKey = scan.includeStartRow();
+ // Retrieve start rowkey of the previous scan. This would be
different than
+ // current scan start rowkey if the region has recently moved or
split or merged.
+ this.prevScanStartRowKey =
+
scan.getAttribute(BaseScannerRegionObserverConstants.SCAN_ACTUAL_START_ROW);
+ this.prevScanIncludeStartRowKey = true;
Review Comment:
And this is always set to true so can it even change when the scan resumes.
Won't it always be true ?
--
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]