Skip to content

Commit

Permalink
Update spark/src/main/scala/org/apache/spark/sql/delta/sources/DeltaD…
Browse files Browse the repository at this point in the history
…ataSource.scala
  • Loading branch information
cloud-fan authored Feb 4, 2025
1 parent dc59767 commit 891167b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ class DeltaDataSource
.getOrElse(snapshot.schema)
}

if (schema.nonEmpty && !DataType.equalsIgnoreCompatibleNullability(readSchema, schema.get)) {
if (schema.nonEmpty && schema.get.nonEmpty &&
!DataType.equalsIgnoreCompatibleNullability(readSchema, schema.get)) {
throw DeltaErrors.specifySchemaAtReadTimeException
}

Expand Down

0 comments on commit 891167b

Please sign in to comment.