@@ -273,7 +273,7 @@ case class StructType(fields: Array[StructField]) extends DataType with Seq[Stru
273273 nameToField.getOrElse(name,
274274 throw new IllegalArgumentException (
275275 s """ Field " $name" does not exist.
276- |Available fields: ${fieldNamesSet .mkString(" , " )}""" .stripMargin))
276+ |Available fields: ${fieldNames .mkString(" , " )}""" .stripMargin))
277277 }
278278
279279 /**
@@ -287,7 +287,7 @@ case class StructType(fields: Array[StructField]) extends DataType with Seq[Stru
287287 if (nonExistFields.nonEmpty) {
288288 throw new IllegalArgumentException (
289289 s """ Nonexistent field(s): ${nonExistFields.mkString(" , " )}.
290- |Available fields: ${fieldNamesSet .mkString(" , " )}""" .stripMargin)
290+ |Available fields: ${fieldNames .mkString(" , " )}""" .stripMargin)
291291 }
292292 // Preserve the original order of fields.
293293 StructType (fields.filter(f => names.contains(f.name)))
@@ -302,7 +302,7 @@ case class StructType(fields: Array[StructField]) extends DataType with Seq[Stru
302302 nameToIndex.getOrElse(name,
303303 throw new IllegalArgumentException (
304304 s """ Field " $name" does not exist.
305- |Available fields: ${fieldNamesSet .mkString(" , " )}""" .stripMargin))
305+ |Available fields: ${fieldNames .mkString(" , " )}""" .stripMargin))
306306 }
307307
308308 private [sql] def getFieldIndex (name : String ): Option [Int ] = {
0 commit comments