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/06/28 11:21:00 UTC
[jira] [Created] (IGNITE-17250) Calcite. Make 'min()/max()' use first/last index value.
| ![](cid:jira-generated-image-avatar-74a95bba-1c40-41a6-9c6f-e23b4debfd35) |
[Vladimir
Steshin](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=vladsz83)
**created** an issue
---|---
|
---
| [Ignite](https://issues.apache.org/jira/browse/IGNITE) /
[![Improvement](cid:jira-generated-image-
avatar-a2ad6fb7-681d-444d-8805-90b69a917812)](https://issues.apache.org/jira/browse/IGNITE-17250)
[IGNITE-17250](https://issues.apache.org/jira/browse/IGNITE-17250)
---
[Calcite. Make 'min()/max()' use first/last index
value.](https://issues.apache.org/jira/browse/IGNITE-17250)
| Issue Type: | ![Improvement](cid:jira-generated-image-
avatar-a2ad6fb7-681d-444d-8805-90b69a917812) Improvement
---|---
Assignee: | [Vladimir
Steshin](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=vladsz83)
Created: | 28/Jun/22 11:20
Priority: | ![Major](cid:jira-generated-image-static-
major-8706a2f2-44fa-4035-bb0d-28d8d3eb701d) Major
Reporter: | [Vladimir
Steshin](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=vladsz83)
|
Currently, Calcite's plan on min()/max() is the table scan and the aggregation
n the indexed field:
"select min(salary) from Person"
Plan:
IgniteReduceHashAggregate(group=[{}], MAX(SALARY)=[MAX($0)])
IgniteExchange(distribution=[single])
IgniteMapHashAggregate(group=[{}], MAX(SALARY)=[MAX($0)])
IgniteTableScan(table=[[PUBLIC, PERSON]], requiredColumns=[{3}])
We could pick up first index record. No need to scan.
---
| | [ ![Add Comment](cid:jira-generated-image-static-comment-icon-
ca74c4e8-5548-43bf-a5cd-0f9600c84d12)
](https://issues.apache.org/jira/browse/IGNITE-17250#add-comment "Add
Comment") | [Add
Comment](https://issues.apache.org/jira/browse/IGNITE-17250#add-comment "Add
Comment")
---|---
| This message was sent by Atlassian Jira (v8.20.10#820010-sha1:ace47f9) | |
![Atlassian logo](https://issues.apache.org/jira/images/mail/atlassian-email-
logo.png)
---