You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Steshin (Jira)" <ji...@apache.org> on 2022/10/21 07:52:00 UTC

[jira] [Updated] (IGNITE-17250) Calcite. Make 'min()/max()' use first/last index value.

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

Vladimir Steshin updated IGNITE-17250:
--------------------------------------
    Ignite Flags: Release Notes Required  (was: Docs Required,Release Notes Required)

> Calcite. Make 'min()/max()' use first/last index value.
> -------------------------------------------------------
>
>                 Key: IGNITE-17250
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17250
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vladimir Steshin
>            Assignee: Vladimir Steshin
>            Priority: Major
>              Labels: ise
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Currently, Calcite's plan on min()/max() is the table scan and the aggregation n the indexed field:
> {code:sql}
> "select min(salary) from Person"
> {code}
> Plan:
> {code:java}
> IgniteReduceHashAggregate(group=[{}], MAX(SALARY)=[MAX($0)])
>   IgniteExchange(distribution=[single])
>     IgniteMapHashAggregate(group=[{}], MAX(SALARY)=[MAX($0)])
>       IgniteTableScan(table=[[PUBLIC, PERSON]], requiredColumns=[{3}])
> {code}
> We could pick up first index record. No need to scan.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)