Ramin Gharib created FLINK-39867:
------------------------------------
Summary: Harden built-in scalar function runtime: remove hot-path
logging and validate constant args
Key: FLINK-39867
URL: https://issues.apache.org/jira/browse/FLINK-39867
Project: Flink
Issue Type: Improvement
Components: Table SQL / API, Table SQL / Runtime
Reporter: Ramin Gharib
Several built-in scalar functions in {{SqlFunctionUtils}} log on every input
row when given malformed input. Per-row logging on a runtime path is an
anti-pattern. It can flood logs, leak user data into log files, and cost
throughput, while the function already returns null or falls back. None of the
log lines change behavior.
FLINK-39648 already removed this pattern from {{{}REGEXP{}}}. This umbrella
applies the same treatment to the remaining cases. Where the logged or failing
condition comes from a constant argument, it replaces the per-row log with
fail-fast plan-time validation via an {{{}InputTypeStrategy{}}}, matching the
regexp approach.
Scope:
* {{{}PARSE_URL, SUBSTRING{}}}: remove per-row logging. No type strategy.
* {{{}ENCODE{}}}: validate a literal charset at planning time. New type
strategy. Removes the per-row warning.
* {{{}STR_TO_MAP{}}}: validate literal regex delimiters at planning time. New
type strategy. Closes an uncaught runtime failure.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)