raminqaf opened a new pull request, #29833:
URL: https://github.com/apache/flink/pull/29833
## What is the purpose of the change
Backport of #29806 to release-2.4. On 2.4, SQL `v[0]` and `v[-1]` on an
array VARIANT return NULL for every row, while the same literal fails during
planning for a plain ARRAY. 2.4.0 is the first release that can restore a
compiled plan with `v[i]`, so landing this before 2.4.0 means no released plan
holds such a literal.
## Brief change log
- Cherry-pick of 485da2c2da8. The code and test hunks apply unchanged.
- The `variant '[' INT ']'` entry in `sql_functions.yml` and
`sql_functions_zh.yml` conflicted, because release-2.4 still has the older
wording and no `VARIANT_GET`. I kept the 2.4 text and added the new rule. The
zh entry now has the same English text as the en entry, as on master.
## Verifying this change
`VariantSemanticTest` (25 tests) and `ArrayTypeTest` (8 tests) in
flink-table-planner pass on this branch.
## 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)`: no. A query with a literal VARIANT index below 1 now fails
during planning, see the release note on FLINK-41370.
- The serializers: no
- The runtime per-record code paths (performance sensitive): no
- 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? no
- If yes, how is the feature documented? not applicable
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code 2.1.319 (Claude Opus 5.5)
--
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]