You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Lars Hofhansl (Jira)" <ji...@apache.org> on 2021/03/10 00:50:00 UTC

[jira] [Resolved] (PHOENIX-6402) Allow using local indexes with uncovered columns in the WHERE clause

     [ https://issues.apache.org/jira/browse/PHOENIX-6402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl resolved PHOENIX-6402.
------------------------------------
    Resolution: Fixed

Merged into master and cherry-picked into 5.1 and 4.x

[~kozdemir] thanks for the brain storming and review.

> Allow using local indexes with uncovered columns in the WHERE clause
> --------------------------------------------------------------------
>
>                 Key: PHOENIX-6402
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6402
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>            Priority: Blocker
>             Fix For: 5.1.1, 4.16.1, 5.2.0
>
>         Attachments: 6402-5.1-v4.txt, 6402-WIP-5.1-v2.txt, 6402-WIP-5.1-v3.txt, 6402-WIP-5.1.txt
>
>
> In PHOENIX-6400 I had to disable using local index when uncovered columns are referenced in the WHERE clause.
> There are two problems:
> # The uncovered columns are represented as ProjectedColumnExpression and not correctly added as filters by the WhereCompiler
> # 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 :)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)