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

Allow using local indexes with uncovered columns in the WHERE clause

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 5.1.1, 4.16.1, 5.2.0
    • None
    • None

    Description

      In PHOENIX-6400 I had to disable using local index when uncovered columns are referenced in the WHERE clause.

      There are two problems:

      1. The uncovered columns are represented as ProjectedColumnExpression and not correctly added as filters by the WhereCompiler
      2. The scanner produced in RegionScannerFactory.getWrappedScanner does not handle this correctly.

      kozdemir and I brainstormed this today.

      What should happen is this:

      • Do not add uncovered column expression as filters for local indexes (they would not be evaluated at right time)
      • Pass the extra filter expression via a scan attribute
      • Do something similar to what we do with conditional expressions (see PhoenixIndexBuilder.executeAtomicOp), where we assemble the complete tuple, then run the filter expression over it.

      This would probably require some surgery, so filing it here as an Improvement in case someone signs up for it

      Attachments

        1. 6402-5.1-v4.txt
          17 kB
          Lars Hofhansl
        2. 6402-WIP-5.1-v3.txt
          15 kB
          Lars Hofhansl
        3. 6402-WIP-5.1-v2.txt
          15 kB
          Lars Hofhansl
        4. 6402-WIP-5.1.txt
          9 kB
          Lars Hofhansl

        Issue Links

          There are no Sub-Tasks for this issue.

          Activity

            People

              larsh Lars Hofhansl
              larsh Lars Hofhansl
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: