zhengruifeng commented on code in PR #49624:
URL: https://github.com/apache/spark/pull/49624#discussion_r1926700253


##########
python/pyspark/ml/feature.py:
##########
@@ -5072,7 +5073,7 @@ def __init__(
         self._setDefault(
             stopWords=StopWordsRemover.loadDefaultStopWords("english"),
             caseSensitive=False,
-            locale=self._java_obj.getLocale(),
+            locale="en_US" if isinstance(self._java_obj, str) else 
self._java_obj.getLocale(),

Review Comment:
   PySpark Classic calls the jvm side to get the default value
   
https://github.com/apache/spark/blob/e7e082663b94d0cc4d8d3d224bd8d819c4b2f4d3/mllib/src/main/scala/org/apache/spark/ml/feature/StopWordsRemover.scala#L129-L138
   
   which is not available in Connect Mode.



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to