-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update concat_ws scalar function to support Utf8View #12309
Update concat_ws scalar function to support Utf8View #12309
Conversation
Signed-off-by: Devan <[email protected]>
Signed-off-by: Devan <[email protected]>
Marking as draft as it looks like we are still working out the CI checks |
Signed-off-by: Devan <[email protected]>
Signed-off-by: Devan <[email protected]>
Signed-off-by: Devan <[email protected]>
Signed-off-by: Devan <[email protected]>
Signed-off-by: Devan <[email protected]>
Signed-off-by: Devan <[email protected]>
Signed-off-by: Devan <[email protected]>
DataType::Utf8View => { | ||
let string_array = as_string_view_array(array)?; | ||
|
||
data_size += string_array.len(); |
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.
data_size
is the estimated string array size after concatenation, I think here it should increment sum of inner buffers' size instead
(And everything else LGTM)
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.
Using data_size += string_array.data_buffers().len();
?
disregard I think I get what you mean I modified it to sum up the inner buffer vec on each iteration and use that as the size
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.
Awesome! Thank you
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.
Thank you @devanbenz -- this looks great to me
Thank you @2010YOUY01 for the review
@@ -796,7 +796,7 @@ EXPLAIN SELECT | |||
FROM test; | |||
---- | |||
logical_plan | |||
01)Projection: concat_ws(Utf8(", "), CAST(test.column1_utf8view AS Utf8), CAST(test.column2_utf8view AS Utf8)) AS c | |||
01)Projection: concat_ws(Utf8(", "), test.column1_utf8view, test.column2_utf8view) AS c |
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 @devanbenz and @2010YOUY01 |
Which issue does this PR close?
Closes #11837
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?