You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "James Taylor (JIRA)" <ji...@apache.org> on 2014/08/12 20:19:13 UTC

[jira] [Created] (PHOENIX-1163) Intersect min/max range with scan range during compilation when salted

James Taylor created PHOENIX-1163:
-------------------------------------

             Summary: Intersect min/max range with scan range during compilation when salted
                 Key: PHOENIX-1163
                 URL: https://issues.apache.org/jira/browse/PHOENIX-1163
             Project: Phoenix
          Issue Type: Bug
            Reporter: James Taylor
            Assignee: James Taylor


There's some hacky code in ParallelIterators that can be removed if we intersect the scan range earlier, during compilation. See this FIXME:
{code}
            if (tableRef.getTable().getBucketNum() != null) {
                KeyRange minMaxRange = context.getMinMaxRange();
                if (minMaxRange != null) {
                    // Add salt byte based on current split, as minMaxRange won't have it
                    minMaxRange = SaltingUtil.addSaltByte(split.getLowerRange(), minMaxRange);
                    // FIXME: seems like this should be possible when we set the scan start/stop
                    // in StatementContext.setScanRanges(). If it doesn't intersect the range for
                    // one salt byte, I don't see how it could intersect it with any of them.
                    if (!ScanUtil.intersectScanRange(splitScan, minMaxRange.getLowerRange(), minMaxRange.getUpperRange())) {
                        continue; // Skip this chunk if no intersection based on minMaxRange
                    }
                }
            }
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)