HyukjinKwon commented on a change in pull request #25133: [SPARK-28365][ML]
Fallback locale to en_US in StopWordsRemover if system default locale isn't in
available locales in JVM
URL: https://github.com/apache/spark/pull/25133#discussion_r303278845
##########
File path:
mllib/src/test/scala/org/apache/spark/ml/feature/StopWordsRemoverSuite.scala
##########
@@ -200,4 +202,17 @@ class StopWordsRemoverSuite extends MLTest with
DefaultReadWriteTest {
s"requirement failed: Column $outputCol already exists.",
"expected")
}
+
+ test("SPARK-28365: Fallback to en_US if default locale isn't in available
locales") {
+ val dummyLocale = Locale.forLanguageTag("test")
+ val oldDefault = Locale.getDefault()
+ Locale.setDefault(dummyLocale)
Review comment:
not a big deal but I would do try-finally to set the local back (just in
case one test failure affects others)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]