Skip to content

Conversation

@Shmuma
Copy link
Contributor

@Shmuma Shmuma commented Nov 4, 2025

Closes #292
Closes #297

@Shmuma Shmuma reopened this Nov 14, 2025
@redcatbear
Copy link
Collaborator

Engine team gave us the tip to also check for HAVING clauses.

if (hasSingleGroupAggregation(select) && !hasAggregateFunction(selectList) &&  !hasAggregateFunction(having) {

Also, they pointed out that in a visitor getChildren should not be necessary. @Shmuma, contact @narmion for context please.

@Shmuma
Copy link
Contributor Author

Shmuma commented Nov 18, 2025

Engine team gave us the tip to also check for HAVING clauses.

if (hasSingleGroupAggregation(select) && !hasAggregateFunction(selectList) &&  !hasAggregateFunction(having) {

Also, they pointed out that in a visitor getChildren should not be necessary. @Shmuma, contact @narmion for context please.

Regarding HAVING is a good point, will check.
New method getChildren is absolutely necessary, without it, it is not possible to traverse the tree properly.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
26.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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.

Wrong handling of aggregate functions in HAVING statement [L3-3596] COUNT(*) returns NULL from an empty group by

3 participants