Skip to content

Conversation

PrabhbirJ
Copy link

@PrabhbirJ PrabhbirJ commented Sep 3, 2025

Description

Fixed invalid SQL generation in subquery GROUP BY clauses. The _resolve_group_bys method was incorrectly adding field aliases to GROUP BY clauses, causing invalid SQL syntax like GROUP BY "name" "alias" instead of the correct GROUP BY "name".

Motivation and Context

#1999
It fixes the open issue 1999.

How Has This Been Tested?

Added regression test test_subquery_group_by_no_alias to verify GROUP BY clauses don't include aliases
Ran make check - all style, lint, and tests passed
Verified SQL generation produces valid GROUP BY "field" instead of invalid GROUP BY "field" "alias"
Tested with the exact reproduction case from issue #1999

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

codspeed-hq bot commented Sep 10, 2025

CodSpeed Performance Report

Merging #2001 will not alter performance

Comparing PrabhbirJ:fix-subquery-groupby-alias (08f74ba) with develop (f660db0)

Summary

✅ 16 untouched

@PrabhbirJ PrabhbirJ force-pushed the fix-subquery-groupby-alias branch from 307e4e9 to 08f74ba Compare September 10, 2025 14:38
@PrabhbirJ PrabhbirJ marked this pull request as draft September 23, 2025 13:40
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.

1 participant