Fix concat_ws with array type don't support length exceed 254#17816
Merged
phd3 merged 1 commit intotrinodb:masterfrom Jun 30, 2023
Merged
Fix concat_ws with array type don't support length exceed 254#17816phd3 merged 1 commit intotrinodb:masterfrom
phd3 merged 1 commit intotrinodb:masterfrom
Conversation
phd3
reviewed
Jun 11, 2023
Member
phd3
left a comment
There was a problem hiding this comment.
Can we add a test for this in TestConcatWsFunction ? you can probably use sequence to generate array.
Contributor
Author
|
@phd3 We add function arguments limit 127 in ExpressionAnalyzer, so this MAX_INPUT_VALUES is no use. Shall we remove it in concat_ws and concat function? trino/core/trino-main/src/main/java/io/trino/sql/analyzer/ExpressionAnalyzer.java Lines 1280 to 1283 in 3b4f6a9 |
2797b84 to
728461a
Compare
Member
|
@Heltman thanks for adding the test.
yes, that seems reasonable to me, we can make that change here itself and adapt the tests |
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.
Description
concat_ws function support argument with string concatenation and array type. They use the public method
Slice concatWs(Slice separator, SliceArray values)for processing. This method limit string concatenation to 254. But the array type should not limit the length of the parameter.Additional context and related issues
Release notes
( ) This is not user-visible or docs only and no release notes are required.
(x) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: