ianmcook commented on code in PR #46529:
URL: https://github.com/apache/spark/pull/46529#discussion_r1619514206


##########
python/pyspark/sql/pandas/conversion.py:
##########
@@ -360,12 +376,25 @@ def createDataFrame(  # type: ignore[misc]
 
         assert isinstance(self, SparkSession)
 
+        timezone = self._jconf.sessionLocalTimeZone()
+
+        if type(data).__name__ == "Table":
+            # `data` is a PyArrow Table
+            from pyspark.sql.pandas.utils import 
require_minimum_pyarrow_version
+
+            require_minimum_pyarrow_version()

Review Comment:
   Sure, I could add an assertion here just to be safe. I think the type hints 
in the function signature should prevent us from getting here if it's not a 
PyArrow Table but I'll add an assertion for good measure.



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