You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Gustavo de Morais (Jira)" <ji...@apache.org> on 2026/05/07 15:56:00 UTC
[jira] [Created] (FLINK-39623) Strict UTF-8 validation in CAST(BYTES AS STRING)
Gustavo de Morais created FLINK-39623:
-----------------------------------------
Summary: Strict UTF-8 validation in CAST(BYTES AS STRING)
Key: FLINK-39623
URL: https://issues.apache.org/jira/browse/FLINK-39623
Project: Flink
Issue Type: Sub-task
Components: Table SQL / API
Reporter: Gustavo de Morais
Assignee: Gustavo de Morais
Implements the CAST behavior change from FLIP-568.
{{CAST(bytes AS STRING)}} (and {{{}VARCHAR{}}}/{{{}CHAR(n){}}} targets) now validates UTF-8 and throws on invalid input, instead of silently substituting {{{}U+FFFD{}}}.
*Migration:*
* {{MAKE_VALID_UTF8(bytes)}} for lenient decode
* {{TRY_CAST(bytes AS STRING)}} for {{NULL}} on failure
* {{table.exec.legacy-bytes-to-string-cast=true}} to restore old behavior
--
This message was sent by Atlassian Jira
(v8.20.10#820010)