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: [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]