-
Notifications
You must be signed in to change notification settings - Fork 540
Fixes 4703 aggregate expressions #5071
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
Merged
hfhbd
merged 15 commits into
sqldelight:master
from
griffio:fix-4703-aggregate-expressions
Mar 19, 2024
Merged
Fixes 4703 aggregate expressions #5071
hfhbd
merged 15 commits into
sqldelight:master
from
griffio:fix-4703-aggregate-expressions
Mar 19, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
not used as requires more complex grammar
Complext expressions
string_agg is TEXT Keep existing function as seems to keep it working
DISTINCT...ORDER BY
TODO - need to revisit
TODO: need to improve SqlExp code
Fixture and Integration
improve coverage of variations
Move the expr type to mixin
isArrayType is used to determine if a resolved type is an array using String :[ There doesn't appear to be a way to check this in the IntermediateType
Otherwise a String is resolved as the return type, without array support in Coalesce
Use existing ordering_term
hfhbd
approved these changes
Mar 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
hfhbd
pushed a commit
that referenced
this pull request
Apr 2, 2024
* First effort at string_agg grammar * Remove string_agg function not used as requires more complex grammar * Fixture tests for aggregate expressions Complext expressions * Add type resolution string_agg is TEXT Keep existing function as seems to keep it working * make string_agg_stmt the first in order * Fixture test for simple string_agg function call with argument * Add Integration test DISTINCT...ORDER BY * Add grammar for array_agg_stmt TODO - need to revisit * Add array type TODO: need to improve SqlExp code * Add tests for array_agg Fixture and Integration * More tests improve coverage of variations * Try to improve Resolver Move the expr type to mixin * Support coalesce with array type isArrayType is used to determine if a resolved type is an array using String :[ There doesn't appear to be a way to check this in the IntermediateType * Add test for Coalesce Otherwise a String is resolved as the return type, without array support in Coalesce * Improve Order By Use existing ordering_term
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π§ π
fixes #4703
Supports
string_agg
- function requires aseparator
argument with optionalORDER BY
See fixture tests for variations
Keep existing function
string_agg
for the simple use and new grammar for complex casesSupports
array_agg
and single parameter use-case. Returnskotlin.Array<T>
Adds Integration tests
Work-arounds β° :
coalesce
,nullif
function needs to support array type