Skip to content
Snippets Groups Projects
Commit e5bb2617 authored by Jacek Laskowski's avatar Jacek Laskowski Committed by Shixiong Zhu
Browse files

[SPARK-21329][SS] Make EventTimeWatermarkExec explicitly UnaryExecNode

## What changes were proposed in this pull request?

Making EventTimeWatermarkExec explicitly UnaryExecNode

/cc tdas zsxwing

## How was this patch tested?

Local build.

Author: Jacek Laskowski <jacek@japila.pl>

Closes #18509 from jaceklaskowski/EventTimeWatermarkExec-UnaryExecNode.
parent 40c7add3
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ import org.apache.spark.rdd.RDD
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.expressions.{Attribute, UnsafeProjection}
import org.apache.spark.sql.catalyst.plans.logical.EventTimeWatermark
import org.apache.spark.sql.execution.SparkPlan
import org.apache.spark.sql.execution.{SparkPlan, UnaryExecNode}
import org.apache.spark.sql.types.MetadataBuilder
import org.apache.spark.unsafe.types.CalendarInterval
import org.apache.spark.util.AccumulatorV2
......@@ -81,7 +81,7 @@ class EventTimeStatsAccum(protected var currentStats: EventTimeStats = EventTime
case class EventTimeWatermarkExec(
eventTime: Attribute,
delay: CalendarInterval,
child: SparkPlan) extends SparkPlan {
child: SparkPlan) extends UnaryExecNode {
val eventTimeStats = new EventTimeStatsAccum()
val delayMs = EventTimeWatermark.getDelayMs(delay)
......@@ -117,6 +117,4 @@ case class EventTimeWatermarkExec(
a
}
}
override def children: Seq[SparkPlan] = child :: Nil
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment