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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]