test: cover a cast inside an aggregate's argument - #6404
Merged
Merged
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
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.
#3534 reported that
sum (artist_id | as int)insideaggregatefailed to type-check (function std.sum, param `column` expected type `array`, but found type `scalar`), while the same cast moved into a precedingderiveworked. On currentmainthe issue's query compiles to exactly the SQL it asked for:The likely fix is #5111, which dropped the
<scalar>return type fromstd.as(read from that diff, not bisected). No test passes a cast to an aggregate, so this addstest_aggregate_of_casttoprqlc/prqlc/tests/integration/sql.rswith the issue's query, next to the similartest_aggregate_of_expressionfrom #6400.Test-only change, so no changelog entry.
Closes #3534