Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected rowset deduplicators DISTINCT and ALL #1380

Merged
merged 7 commits into from
Jan 26, 2025

Conversation

trueqbit
Copy link
Collaborator

  • Fixed the missing ability to write distinct(struct_<>()).
  • Corrected serialization of DISTINCT/ALL: They don't introduce a parenthesized context.
  • Added Unit Tests.
  • Moved rowset deduplicators to the syntax tree. Previously, the DISTINCT/ALL result set deduplicators were stored as a member flag (i.e. runtime value) in columns_t and struct_t. I moved it to the AST because it is part of the logical structure of an SQL select expression.
  • The previous point also fixes collecting column names.

* `distinct(struct<>())` was missing.
* Corrected streaming of DISTINCT/ALL; they must not parenthesize expressions following those result set modifiers.
* Created unit tests for distinct/all.
* Previously, the DISTINCT/ALL result set deduplicator was stored as a member flag (i.e. runtime value) in `columns_t` and `struct_t`. I moved it to the AST because it is part of the logical structure of an SQL select expression.
* Corrected UT for `distinct(glob())`.
* Added a UT for distinct in an aggregate function, `count(distinct())`.
@trueqbit trueqbit linked an issue Jan 25, 2025 that may be closed by this pull request
@trueqbit trueqbit requested a review from fnc12 January 25, 2025 19:43
@trueqbit trueqbit merged commit 5e21e5a into dev Jan 26, 2025
3 checks passed
@trueqbit trueqbit deleted the corrected_rowset_deduplicators branch January 26, 2025 12:39
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.

Select distinct with return struct results in extra parenthesis
2 participants