Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1163

Intersect min/max range with scan range during compilation when salted

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.2.0, 3.2.0
    • Component/s: None
    • Labels:
      None

      Description

      There's some hacky code in ParallelIterators that can be removed if we intersect the scan range earlier, during compilation. See this FIXME:

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

        Attachments

          Activity

            People

            • Assignee:
              jamestaylor James R. Taylor
              Reporter:
              jamestaylor James R. Taylor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: