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

   ## What is the purpose of the change
   
   Fix binary-array CAST code generation described in 
[FLINK-40606](https://issues.apache.org/jira/browse/FLINK-40606). 
Array-to-array and VARIANT-to-array casts can generate invalid Java such as 
`new byte[][size]`, causing Janino compilation to fail.
   
   ## Brief change log
   
   - Place the allocated dimension before existing array dimensions, generating 
`new byte[size][]`.
   - Add `CastRulesTest` regressions for binary-array truncation/padding, null 
and empty arrays, and VARIANT arrays containing binary and null elements.
   
   ## Verifying this change
   
   - Red/green verification: all five new cases fail with the original 
allocation code and pass with the fix.
   - `CastRulesTest` and `CastRuleProviderTest`: 735 tests passed.
   - Spotless and Checkstyle passed.
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies: no.
   - Public API: no.
   - Serializers: no.
   - Runtime per-record code paths: yes, the generated array allocation for 
affected CASTs; the element loop is unchanged.
   - Deployment or recovery: no.
   - S3 file system connector: no.
   
   ## Documentation
   
   - New feature: no.
   - Feature documentation: not applicable. The JIRA Release Notes field 
describes the fix.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes
   
   Generated-by: Codex (GPT-6)
   


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