-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix regression list Type Coercion List with inner type struct which has large/view types #14385
Conversation
a578ebe
to
f0583a6
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.
lgtm thanks @alamb
@@ -459,14 +459,14 @@ create table t as values({r: 'a', c: 1}), ({r: 'b', c: 2.3}); | |||
query ? | |||
select * from t; | |||
---- | |||
{c0: a, c1: 1.0} |
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.
the column names change is the part of the fix?
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.
Yes -- these are the field names of the struct type
The values that were written into the table are liek this (a few rows above). Note the field names are r
and c
create table t as values({r: 'a', c: 1}), ({r: 'b', c: 2.3});
Because they got coerced (1 needed to get coercered to the same type as 2.3) the field names got reassigned to c0
and c1
🤯 )
The fix in this PR preserves the names from the input which seems much more correct to me
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 (again) @comphead -- I also merged this PR up to my branch locally and verified it passed the tests
…as large/view types (apache#14385) * Test for coercing inner structs * Fix but, update tests * Update tests
Which issue does this PR close?
Rationale for this change
See issue -- nested structs in Lists are not coerced correctly
What changes are included in this PR?
CASE
#14384 to the type_union resolution)Are these changes tested?
Yes, new sqllogictests
Are there any user-facing changes?
Bug fix