Skip to content

[FEATURE] Aggregation enhancement for SUM on FIELD + NUMBER #3967

@qianheng-aws

Description

@qianheng-aws

Is your feature request related to a problem?
Based on the idea that SUM(FIELD + NUMBER) could be optimized to SUM(FIELD) + NUMBER * COUNT(), some queries like q30 in clickbench are able to be improved greatly, since the result of SUM(FIELD) and COUNT() could be reused multiple times.

https://github.com/opensearch-project/sql/blob/main/integ-test/src/test/resources/clickbench/queries/q30.ppl

What solution would you like?
A clear and concise description of what you want to happen.

What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

Labels

calcitecalcite migration releatedenhancementNew feature or requestv3.3.0

Type

No type

Projects

Status

New

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions