Skip to content

Commit 3981421

Browse files
[SPARK-23731][SQL] FileSourceScanExec throws NullPointerException in subexpression elimination
1 parent 61487b3 commit 3981421

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/DataSourceScanExec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ case class FileSourceScanExec(
163163
override val tableIdentifier: Option[TableIdentifier])
164164
extends DataSourceScanExec with ColumnarBatchScan {
165165

166-
override val supportsBatch: Boolean = relation.fileFormat.supportBatch(
166+
override val supportsBatch: Boolean = relation != null && relation.fileFormat.supportBatch(
167167
relation.sparkSession, StructType.fromAttributes(output))
168168

169169
override val needsUnsafeRowConversion: Boolean = {

0 commit comments

Comments
 (0)