You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2018/12/22 18:43:45 UTC
[GitHub] MaxGekk commented on a change in pull request #23373:
[SPARK-14023][CORE] Don't reference 'field' in StructField errors for
clarity in exceptions
MaxGekk commented on a change in pull request #23373: [SPARK-14023][CORE] Don't reference 'field' in StructField errors for clarity in exceptions
URL: https://github.com/apache/spark/pull/23373#discussion_r243743473
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructType.scala
##########
@@ -286,8 +285,8 @@ case class StructType(fields: Array[StructField]) extends DataType with Seq[Stru
val nonExistFields = names -- fieldNamesSet
if (nonExistFields.nonEmpty) {
throw new IllegalArgumentException(
- s"""Nonexistent field(s): ${nonExistFields.mkString(", ")}.
- |Available fields: ${fieldNames.mkString(", ")}""".stripMargin)
+ s"""${nonExistFields.mkString(", ")} do not exist.
Review comment:
`nonExistFields` can contain only one element, right? Maybe `do`/`does`?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org