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

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #40534: [SPARK-42908][PYTHON] Raise RuntimeError if SparkContext is not initialized when parsing DDL-formatted type strings

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


##########
python/pyspark/sql/types.py:
##########
@@ -1211,7 +1211,10 @@ def _parse_datatype_string(s: str) -> DataType:
     from pyspark import SparkContext
 
     sc = SparkContext._active_spark_context
-    assert sc is not None

Review Comment:
   In fact, we should fix a lot of this places in, e.g., `pyspark.sql.functions.*` too .. 



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