[FLINK-39866][table] Remove dead KEYVALUE code from SqlFunctionUtils and StringCallGen#28501
Open
raminqaf wants to merge 1 commit into
Open
[FLINK-39866][table] Remove dead KEYVALUE code from SqlFunctionUtils and StringCallGen#28501raminqaf wants to merge 1 commit into
KEYVALUE code from SqlFunctionUtils and StringCallGen#28501raminqaf wants to merge 1 commit into
Conversation
…and StringCallGen
Collaborator
Contributor
Author
|
@flinkbot run azure |
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.
What is the purpose of the change
This is a code cleanup that removes the unreachable
KEYVALUEimplementation code.KEYVALUEwas dropped as a built-in SQL function in FLINK-13547 (Aug 2019) because it is non-standard and covered bySTR_TO_MAP(str)[key]. That change removed the operator registration inFlinkSqlOperatorTableand the code-gen dispatchcase KEYVALUE => generateKeyValue(...), but left the implementation methods behind. They have had no callers since.KEYVALUEno longer resolves at all today. A query likeSELECT KEYVALUE('a=1,b=2,c=3', ',', '=', 'b')fails at SQLvalidation with
No match found for function signature KEYVALUE(...), so the leftover methods are never reachable from aquery.
Brief change log
StringCallGen.generateKeyValue(no dispatch since FLINK-13547).SqlFunctionUtils.keyValueoverloads.BinaryStringDataUtil.keyValueand its private helpersfindValueOfKey,keyValueSlow,findValueOfKeySlow,together with the now-orphanedBinaryStringDataTest#testKeyValue.Validate Removal
SELECT KEYVALUE('a=1,b=2,c=3', ',', '=', 'b')intoWordCountSQLExampleand ran it against the unmodified source (orphans still present). Result:Verifying this change
This change is a trivial rework / code cleanup without any test coverage. The removed methods had no production callers, and the rest of
BinaryStringDataUtilremains covered byBinaryStringDataTest.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation