You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by jiangxb1987 <gi...@git.apache.org> on 2018/03/05 02:43:32 UTC
[GitHub] spark pull request #20649: [SPARK-23462][SQL] improve missing field error me...
Github user jiangxb1987 commented on a diff in the pull request:
https://github.com/apache/spark/pull/20649#discussion_r172080837
--- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructType.scala ---
@@ -284,7 +286,8 @@ case class StructType(fields: Array[StructField]) extends DataType with Seq[Stru
val nonExistFields = names -- fieldNamesSet
if (nonExistFields.nonEmpty) {
throw new IllegalArgumentException(
- s"Field ${nonExistFields.mkString(",")} does not exist.")
+ s"""Fields ${nonExistFields.mkString(", ")} does not exist.
--- End diff --
nit: `nonExistFields` can contain only one field, so maybe `Fields` -> `Field(s)`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org