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/03 20:44:00 UTC

[jira] [Updated] (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 updated PHOENIX-6402:
-----------------------------------
    Description: 
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 filtered 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 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 :)

  was:
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 filtered 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 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 to filing it here as an Improvement in case someone signs up for it :)


> 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
>            Priority: Major
>
> 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 filtered 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 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)