HyukjinKwon commented on code in PR #36587:
URL: https://github.com/apache/spark/pull/36587#discussion_r875419684


##########
python/pyspark/sql/utils.py:
##########
@@ -292,12 +292,4 @@ def is_timestamp_ntz_preferred() -> bool:
     """
     Return a bool if TimestampNTZType is preferred according to the SQL 
configuration set.
     """
-    jvm = SparkContext._jvm
-    return (
-        jvm is not None
-        and getattr(getattr(jvm.org.apache.spark.sql.internal, "SQLConf$"), 
"MODULE$")
-        .get()
-        .timestampType()
-        .typeName()
-        == "timestamp_ntz"
-    )
+    return SparkContext._jvm.PythonSQLUtils.isTimestampNTZPreferred()  # type: 
ignore[union-attr]

Review Comment:
   ```suggestion
       jvm = SparkContext._jvm
       return jvm is not None and jvm.PythonSQLUtils.isTimestampNTZPreferred()  
# type: ignore[union-attr]
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to