Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-258 Use skip scan when SELECT DISTINCT on leading row key column(s)
  3. PHOENIX-3157

Refactor DistinctPrefixFilter as filter wrapper so that it can work with non-pk column filters.

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      See PHOENIX-3156. The issue is pretty tricky:

      1. only filterKeyValue can make skip decision
      2. we're skiping rows (not Cells)
      3. the next Cell we skip to is dynamic (not know ahead of time)
      4. we can only skip if the row as a whole has not been filtered

      So in order to support non-pk column filters with this optimization (i.e. SELECT DISTINCT(pk1-prefix) FROM table WHERE non-pk-column = xxx) we need to refashion this is FilterWrapper and only fire the optimization when the inner filter did not filter the entire row, this is in many cases hard to determine. It's certainly more complex than the TransactionVisibilityFilter.

      James Taylor

        Attachments

        1. 3157-DOES_NOT_WORK.txt
          10 kB
          Lars Hofhansl

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lhofhansl Lars Hofhansl
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: