From 0a2eb7c8f7bb6517a362be3673f5b19274921e8d Mon Sep 17 00:00:00 2001 From: Angerszhuuuu Date: Tue, 21 May 2024 09:54:46 +0900 Subject: [PATCH] [SPARK-48340][PYTHON] Support TimestampNTZ infer schema miss prefer_timestamp_ntz ### What changes were proposed in this pull request? Support TimestampNTZ infer schema miss prefer_timestamp_ntz ### Why are the changes needed? Fix bug ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? ### Was this patch authored or co-authored using generative AI tooling? No Closes #46666 from AngersZhuuuu/SPARK-48340. Authored-by: Angerszhuuuu Signed-off-by: Hyukjin Kwon --- python/pyspark/sql/types.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/pyspark/sql/types.py b/python/pyspark/sql/types.py index 05ecb5b388757..3f1e9ee83f101 100644 --- a/python/pyspark/sql/types.py +++ b/python/pyspark/sql/types.py @@ -2171,6 +2171,7 @@ def _infer_type( obj, infer_dict_as_struct=infer_dict_as_struct, infer_array_from_first_element=infer_array_from_first_element, + prefer_timestamp_ntz=prefer_timestamp_ntz, ) except TypeError: raise PySparkTypeError(