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


##########
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":

Review Comment:
   I think it would be good to check the module also, although I'm not sure if 
there are any other variations to "pyarrow.lib"?



##########
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:
   Would it be good to check pa.Table with isinstance at this point?



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