[ 
https://issues.apache.org/jira/browse/FLINK-39623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079984#comment-18079984
 ] 

Sergey Nuyanzin commented on FLINK-39623:
-----------------------------------------

Merged as 
[d1e3d13de8a099f045c7d292a26d6e8d48c53766|https://github.com/apache/flink/commit/d1e3d13de8a099f045c7d292a26d6e8d48c53766]

> 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
>
> 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)

Reply via email to