Skip to content

Commit a003aeb

Browse files
committed
Remove error (it'll be caught in analysis).
1 parent 184cd51 commit a003aeb

File tree

1 file changed

+0
-4
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/types

1 file changed

+0
-4
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/types/dataTypes.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,13 +308,9 @@ case class StructField(name: String, dataType: DataType, nullable: Boolean) {
308308
object StructType {
309309
protected[sql] def fromAttributes(attributes: Seq[Attribute]): StructType =
310310
StructType(attributes.map(a => StructField(a.name, a.dataType, a.nullable)))
311-
312-
private def validateFields(fields: Seq[StructField]): Boolean =
313-
fields.map(field => field.name).distinct.size == fields.size
314311
}
315312

316313
case class StructType(fields: Seq[StructField]) extends DataType {
317-
require(StructType.validateFields(fields), "Found fields with the same name.")
318314

319315
/**
320316
* Returns all field names in a [[Seq]].

0 commit comments

Comments
 (0)