-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[Nested] Fix incorrect type casting in list_reduce lambda expressions #17581
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
[Nested] Fix incorrect type casting in list_reduce lambda expressions #17581
Conversation
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.
Hi @maiadegraaf - thanks! I left a few comments, mostly nits around code structure and some names. :))
0da4d31
to
4e59c16
Compare
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.
Left a few more comments. :)
Thanks for the PR! LGTM - should we retarget this to |
…ype handling Now the lambda function columns match the max logical type of the list child and initial value.
377d2e2
to
0cf0a88
Compare
0cf0a88
to
74d7bd9
Compare
I think retargeting to |
Thanks! |
[Nested] Fix incorrect type casting in list_reduce lambda expressions (duckdb/duckdb#17581) Pop up ICU errors to the csv sniffer (duckdb/duckdb#17719)
[Nested] Fix incorrect type casting in list_reduce lambda expressions (duckdb/duckdb#17581) Pop up ICU errors to the csv sniffer (duckdb/duckdb#17719) Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Fixes: #17008
This PR fixes an issue with type casting in lambda expressions used in the
list_reduce
function.For example, in the following query:
The lambda expression was incorrectly bound as:
Now proper type casting is implemented to match the max logical type of both the list child type and the initial value type:
Test Cases
Added tests to verify the correct casting behaviour