[
https://issues.apache.org/jira/browse/SPARK-49515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun closed SPARK-49515.
---------------------------------
> numInputRows is 0 when one of input relation is empty
> -----------------------------------------------------
>
> Key: SPARK-49515
> URL: https://issues.apache.org/jira/browse/SPARK-49515
> Project: Spark
> Issue Type: Bug
> Components: Structured Streaming
> Affects Versions: 3.4.0
> Environment: Reproducible in Spark 3.4 , probably all versions after
> introducing org.apache.spark.sql.catalyst.optimizer.PropagateEmptyRelation
>
> Reporter: Eunjin Song
> Priority: Trivial
> Fix For: 3.5.3
>
> Attachments: Query 0.png, Query 1.png, Query 2.png
>
>
> [https://github.com/apache/spark/blob/2ed6c3e511f322c5fd01953736c376a85ff2c687/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ProgressReporter.scala#L481]
>
> In case # relation of logical plan != # relation of physical plan,
> numInputRows captured as 0 for all sources. However it includes the case that
> empty relations in union is removed from physical plan by
> "org.apache.spark.sql.catalyst.optimizer.PropagateEmptyRelation".
>
> Repro code:
> import org.apache.spark.sql.streaming.Trigger
> val df1 = spark.readStream.schema(sch).parquet("/streaming/parquet1")
> val df2 = spark.readStream.schema(sch).parquet("/streaming/emptyparquet")
> df1.union(df2).writeStream.option("checkpointLocation",
> "/streaming/checkpoint8").format("parquet").trigger(Trigger.Once()).option("path",
> "/streaming/result9").start
>
> workaround:
> spark.conf.set("spark.sql.optimizer.excludedRules","org.apache.spark.sql.catalyst.optimizer.PropagateEmptyRelation")
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]