You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ueshin (via GitHub)" <gi...@apache.org> on 2023/03/12 03:43:10 UTC

[GitHub] [spark] ueshin commented on a diff in pull request #40382: [SPARK-42679][CONNECT][PYTHON] createDataFrame doesn't work with non-nullable schema

ueshin commented on code in PR #40382:
URL: https://github.com/apache/spark/pull/40382#discussion_r1133181232


##########
python/pyspark/sql/connect/session.py:
##########
@@ -267,6 +269,10 @@ def createDataFrame(
                 [ser._create_batch([(c, t) for (_, c), t in zip(data.items(), arrow_types)])]
             )
 
+            if isinstance(schema, StructType):
+                assert arrow_schema is not None

Review Comment:
   It just makes `mypy` happy. 😄 
   
   btw, `to_arrow_schema` returns `pa.Schema`.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org