stefanbuk-db commented on code in PR #45407:
URL: https://github.com/apache/spark/pull/45407#discussion_r1519208459


##########
sql/api/src/main/scala/org/apache/spark/sql/types/StructType.scala:
##########
@@ -283,10 +283,10 @@ case class StructType(fields: Array[StructField]) extends 
DataType with Seq[Stru
   def apply(name: String): StructField = {
     nameToField.getOrElse(name,
       throw new SparkIllegalArgumentException(
-        errorClass = "_LEGACY_ERROR_TEMP_3254",
+        errorClass = "FIELD_NOT_FOUND",
         messageParameters = immutable.Map(
-          "name" -> name,
-          "fieldNames" -> fieldNames.mkString(", "))))
+          "fieldName" -> name,

Review Comment:
   Done in new commits.



##########
sql/api/src/main/scala/org/apache/spark/sql/types/StructType.scala:
##########
@@ -316,10 +316,10 @@ case class StructType(fields: Array[StructField]) extends 
DataType with Seq[Stru
   def fieldIndex(name: String): Int = {
     nameToIndex.getOrElse(name,
       throw new SparkIllegalArgumentException(
-        errorClass = "_LEGACY_ERROR_TEMP_3252",
+        errorClass = "FIELD_NOT_FOUND",
         messageParameters = immutable.Map(
-          "name" -> name,
-          "fieldNames" -> fieldNames.mkString(", "))))
+          "fieldName" -> name,

Review Comment:
   Done.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to