This is an automated email from the ASF dual-hosted git repository. srowen pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 3b73729 [MINOR][ML] Fix confusing error message in VectorAssembler 3b73729 is described below commit 3b73729dcc141c2fac735d271ba56e50a3f3536e Author: Tigran Saluev <tig...@saluev.com> AuthorDate: Thu Feb 27 11:05:53 2020 -0600 [MINOR][ML] Fix confusing error message in VectorAssembler ### What changes were proposed in this pull request? When VectorAssembler encounters a NULL with handleInvalid="error", it throws an exception. This exception, though, has a typo making it confusing. Yet apparently, this same exception for NaN values is fine. Fixed it to look like the right one. ### Why are the changes needed? Encountering this error with such message was very confusing! I hope to save time of fellow engineers by improving it. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? It's just an error message... Closes #27709 from Saluev/patch-1. Authored-by: Tigran Saluev <tig...@saluev.com> Signed-off-by: Sean Owen <sro...@gmail.com> (cherry picked from commit 6f4a2e4c99dadf111e43c6e5b4d7ee5e4d4bd8f6) Signed-off-by: Sean Owen <sro...@gmail.com> --- mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala b/mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala index 51acbf3..3070012 100644 --- a/mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala +++ b/mllib/src/main/scala/org/apache/spark/ml/feature/VectorAssembler.scala @@ -288,7 +288,7 @@ object VectorAssembler extends DefaultParamsReadable[VectorAssembler] { featureIndex += length } else { throw new SparkException( - s"""Encountered null while assembling a row with handleInvalid = "keep". Consider + s"""Encountered null while assembling a row with handleInvalid = "error". Consider |removing nulls from dataset or using handleInvalid = "keep" or "skip".""" .stripMargin) } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org