Skip to content

[CALCITE-7863] AggregateReduceFunctionsOnGroupKeysRule fails for constant aggregates on empty input - #5336

Open
xiedeyantu wants to merge 1 commit into
apache:mainfrom
xiedeyantu:CALCITE-7863
Open

xiedeyantu wants to merge 1 commit into
apache:mainfrom
xiedeyantu:CALCITE-7863

Conversation

@xiedeyantu

Copy link
Copy Markdown
Member

Jira Link

CALCITE-7863

Changes Proposed

See CALCITE-7863

@sonarqubecloud

Copy link
Copy Markdown

if (!Aggregate.isSimple(aggregate)) {
return null;
}
// A global aggregate may return NULL on empty input even when its

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aggregate functions don't always return NULL on empty input. For example COUNT returns 0.

Is there an interface on SqlFunction that reports the value an aggregate function returns on empty input?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants