Skip to content

Commit 3383473

Browse files
remove the assertion, as it's not true for empty partitioned table
1 parent bdee89e commit 3383473

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -561,11 +561,6 @@ abstract class HadoopFsRelation private[sql](maybePartitionSpec: Option[Partitio
561561
}: _*)
562562
}
563563

564-
assert(userProvidedSchema.length == spec.partitionColumns.length &&
565-
userProvidedSchema.fieldNames.sameElements(spec.partitionColumns.fieldNames),
566-
s"Actual partitioning column names did not match user-specified partitioning schema; " +
567-
s"expect $userProvidedSchema, but got ${spec.partitionColumns}}")
568-
569564
PartitionSpec(userProvidedSchema, spec.partitions.map { part =>
570565
part.copy(values = castPartitionValuesToUserSchema(part.values))
571566
})

0 commit comments

Comments
 (0)