gustavodemorais opened a new pull request, #28111:
URL: https://github.com/apache/flink/pull/28111

   ## What is the purpose of the change
   
   Adds two built-in SQL functions: IS_VALID_UTF8 for routing invalid records 
to a dead-letter sink, and MAKE_VALID_UTF8 for explicit lossy decoding 
(substitutes invalid sequences with U+FFFD). Both are also exposed via the 
Table API; input is BINARY/VARBINARY. Part of FLIP-568.
   
   ## Brief change log
   
   - Add IS_VALID_UTF8 and MAKE_VALID_UTF8 to BuiltInFunctionDefinitions.
   - Add BYTES.isValidUtf8 and BYTES.makeValidUtf8 Table API methods on 
BaseExpressions.
   - Add EncodingUtils.isValidUtf8 with an inline Flink-style validator. Note: 
Self-contained so this PR does not depend on FLINK-39601; a comment notes that 
once that lands, this should delegate to 
StringUtf8Utils.firstInvalidUtf8ByteIndex.
   - Document both functions in sql_functions.yml
   
   ## Verifying this change
   
   - Utf8FunctionsITCase 
   - EncodingUtilsTest
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies (does it add or upgrade a dependency): (no)
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes - two new BuiltInFunctionDefinition entries and two 
new Table API methods on BaseExpressions)
   - The serializers: (no)
   - The runtime per-record code paths (performance sensitive): (no - new 
functions only)
   - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
   - The S3 file system connector: (no)
   
   ## Documentation
   
   - Does this pull request introduce a new feature? (yes)
   - If yes, how is the feature documented? (Entries in sql_functions.yml and 
sql_functions_zh.yml under conversion, plus JavaDocs on the runtime function 
classes and the new BaseExpressions methods.)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes (please specify the tool below)
   
   2.1.117 (Claude Code)


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