manner opened a new pull request, #29080:
URL: https://github.com/apache/flink/pull/29080
## What is the purpose of the change
Extends VARIANT-to-scalar casting to the temporal types added in
FLINK-40491: `TIME` and nanosecond-precision `TIMESTAMP` / `TIMESTAMP_LTZ`.
A VARIANT holding such a value can now be cast to `TIME(3)`, `TIMESTAMP(9)`,
`TIMESTAMP_LTZ(9)` and to a string, with `CAST` failing / `TRY_CAST` returning
`NULL` on a kind mismatch.
## Brief change log
- Enable `CAST` / `TRY_CAST` from `VARIANT` to `TIME`
- Accept the `TIMESTAMP_NS` / `TIMESTAMP_LTZ_NS` storage kinds when
casting to `TIMESTAMP(p)` / `TIMESTAMP_LTZ(p)`
- Render `TIME` / `TIMESTAMP_NS` / `TIMESTAMP_LTZ_NS` when casting
`VARIANT` to a string
- Update the cast-support matrix in the docs
## Verifying this change
This change added tests in `CastRulesTest` (`VARIANT` →
`TIME`/`TIMESTAMP(9)`/`TIMESTAMP_LTZ(9)`, both storage kinds, plus string
rendering), `LogicalTypeCastsTest` and `CastRuleProviderTest`.
## 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**
- 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? **yes** (new castable
type pairs for `VARIANT`)
- If yes, how is the feature documented? **docs** (cast-support matrix)
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes (please specify the tool below)
Generated-by: Claude Code (Claude Opus 4.8)
--
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]