raminqaf opened a new pull request, #28501:
URL: https://github.com/apache/flink/pull/28501

   ## What is the purpose of the change
   
   This is a code cleanup that removes the unreachable `KEYVALUE` 
implementation code. `KEYVALUE` was dropped as a built-in SQL function in 
FLINK-13547 (Aug 2019) because it is non-standard and covered by 
`STR_TO_MAP(str)[key]`. That change removed the operator registration in 
`FlinkSqlOperatorTable` and the code-gen dispatch `case KEYVALUE => 
generateKeyValue(...)`, but left the implementation methods behind. They have 
had no callers since.
   
   `KEYVALUE` no longer resolves at all today. A query like `SELECT 
KEYVALUE('a=1,b=2,c=3', ',', '=', 'b')` fails at SQL
   validation with `No match found for function signature KEYVALUE(...)`, so 
the leftover methods are never reachable from a
   query.
   
   ## Brief change log
   
     - Remove `StringCallGen.generateKeyValue` (no dispatch since FLINK-13547).
     - Remove both `SqlFunctionUtils.keyValue` overloads.
     - Remove `BinaryStringDataUtil.keyValue` and its private helpers 
`findValueOfKey`, `keyValueSlow`, `findValueOfKeySlow`,together with the 
now-orphaned `BinaryStringDataTest#testKeyValue`.
   
   ## Validate Removal
   `SELECT KEYVALUE('a=1,b=2,c=3', ',', '=', 'b')` into `WordCountSQLExample` 
and ran it against the unmodified source (orphans still present). Result:
   ```
   SQL validation failed. From line 1, column 8 to line 1, column 45:
   No match found for function signature KEYVALUE(<CHARACTER>, <CHARACTER>, 
<CHARACTER>, <CHARACTER>)
   ```
   
   ## 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 
`BinaryStringDataUtil` remains covered by `BinaryStringDataTest`.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to