rionmonster opened a new pull request, #27650: URL: https://github.com/apache/flink/pull/27650
## What is the purpose of the change This pull request addresses [FLINK-39123](https://issues.apache.org/jira/browse/FLINK-39123) by extending `ValueLiteralExpression` support for higher precision levels in `TIMESTAMP_LTZ()` types. Previously, precision was explicitly capped at 3; this change aligns Flink with the expanded precision support introduced in more recent Calcite releases (1.33+). ## Brief change log - Updated the `ValueLiteralExpression.asSerializableString()` function for `TIMESTAMP_WITH_LOCAL_TIME_ZONE` cases to remove the previous precision constraint (capped at 3) in favor of generating outputting a properly formatted `TIMESTAMP WITH LOCAL TIME ZONE` string. - Added a series of tests within the existing `ExpressionTest` to verify behavior for various precision levels (e.g., 0, 3, 9), which were originally written as negative tests cases to confirm current behavior such as throwing an `TableException` for larger precision values. - Added and updated tests cases within the `LiteralExpressionsSerializationITCase` to explicitly check higher precision values to ensure they were applied as expected. ## Verifying this change This change added a series of tests in `ExpressionTest` and `LiteralExpressionsSerializationITCase` (both via a red-green cycle) to confirm expected outputs, namely: - `ExpressionTest.testTimestampLtzPrecision{precision}AsSerializableString` to verify varying precision levels and their respective outputs (three tests total) - `LiteralExpressionsSerializationITCase.testSqlSerialization` to update the previous case (using precision of 3) with the updated output and an additional case (using precision of 9). ### Example Tests <img width="709" height="464" alt="Screenshot 2026-02-23 at 11 47 21 AM" src="https://github.com/user-attachments/assets/27d42667-ddae-4aa5-8c08-d1e79fd27abd" /> ## 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: **no/don't know** - The S3 file system connector: **no** ## Documentation - Does this pull request introduce a new feature? **no** - If yes, how is the feature documented? **no** -- 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]
