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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.2.0, 3.2.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: