gustavodemorais commented on code in PR #28125:
URL: https://github.com/apache/flink/pull/28125#discussion_r3208654982


##########
docs/data/sql_functions.yml:
##########
@@ -794,7 +794,7 @@ conditional:
 conversion:
   - sql: CAST(value AS type)
     table: ANY.cast(TYPE)
-    description: Returns a new value being cast to type type. A CAST error 
throws an exception and fails the job. When performing a cast operation that 
may fail, like STRING to INT, one should rather use TRY_CAST, in order to 
handle errors. If "table.exec.legacy-cast-behaviour" is enabled, CAST behaves 
like TRY_CAST. E.g., CAST('42' AS INT) returns 42; CAST(NULL AS STRING) returns 
NULL of type STRING; CAST('non-number' AS INT) throws an exception and fails 
the job.
+    description: Returns a new value being cast to type type. A CAST error 
throws an exception and fails the job. When performing a cast operation that 
may fail, like STRING to INT, one should rather use TRY_CAST, in order to 
handle errors. If "table.exec.legacy-cast-behaviour" is enabled, CAST behaves 
like TRY_CAST. E.g., CAST('42' AS INT) returns 42; CAST(NULL AS STRING) returns 
NULL of type STRING; CAST('non-number' AS INT) throws an exception and fails 
the job. Casting BINARY/VARBINARY/BYTES to a CHAR/VARCHAR/STRING type validates 
that the input is well-formed UTF-8 and throws on invalid sequences. Use 
MAKE_VALID_UTF8 to substitute the Unicode replacement character `U+FFFD` for 
invalid bytes, TRY_CAST to return NULL, or set 
"table.exec.legacy-bytes-to-string-cast" to "true" to restore the prior 
silent-substitution behavior.

Review Comment:
   done



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