[
https://issues.apache.org/jira/browse/FLINK-39623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Nuyanzin resolved FLINK-39623.
-------------------------------------
Fix Version/s: 2.4.0
Resolution: Fixed
> 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
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.4.0
>
>
> 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)