Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-46769][SQL] Refine timestamp related schema inference
### What changes were proposed in this pull request? This is a refinement of #43243 . This PR enforces one thing: we only infer TIMESTAMP NTZ type using NTZ parser, and only infer LTZ type using LTZ parser. This consistency is important to avoid nondeterministic behaviors. ### Why are the changes needed? Avoid non-deterministic behaviors. After #43243 , we can still have inconsistency if the LEGACY mode is enabled. ### Does this PR introduce _any_ user-facing change? Yes for the legacy parser. Now it's more likely to infer string type instead of inferring timestamp type "by luck" ### How was this patch tested? existing tests ### Was this patch authored or co-authored using generative AI tooling? no Closes #44789 Closes #44800 from cloud-fan/infer. Authored-by: Wenchen Fan <wenchen@databricks.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
- Loading branch information
Showing
3 changed files
with
54 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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