Repository navigation
Conversation
try_make_timestamp and try_make_timestamp_ltz become MakeTimestamp with failOnError = false, which returns NULL for invalid input even in ANSI mode. Gluten mapped every MakeTimestamp to Velox's make_timestamp, which throws when ANSI mode is enabled. Map MakeTimestamp with failOnError = false and a TIMESTAMP result to Velox's try_make_timestamp, which never throws for invalid input.
|
Run Gluten Clickhouse CI on x86 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are proposed in this pull request?
try_make_timestampandtry_make_timestamp_ltzbecomeMakeTimestampwithfailOnError = false, which returns NULL for invalid input even in ANSI mode. Gluten mapped everyMakeTimestampto Velox'smake_timestamp, which throws when ANSI mode is enabled, so withspark.gluten.sql.ansiFallback.enabled=falsethese functions threw instead of returning NULL.This PR maps
MakeTimestampwithfailOnError = falseand a TIMESTAMP result to Velox'stry_make_timestamp, which never throws for invalid input. Velox registerstry_make_timestampfor TIMESTAMP results only, so TIMESTAMP_NTZ results keep the current mapping.Related issue: #10134 (TryMakeTimestampLTZExpressionBuilder)
How was this patch tested?
Added a test to
ArithmeticAnsiValidateSuite(ANSI mode on, ANSI fallback off, Spark 4.0+):try_make_timestampandtry_make_timestamp_ltzreturn NULL for an invalid month and run in Velox, whilemake_timestampstill throws. Passed on Spark 4.1. Without the change, the new test fails.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)