Skip to content

Commit effca98

Browse files
committed
[SPARK-22720][SS] Make EventTimeWatermark Extend UnaryNode
## What changes were proposed in this pull request? Our Analyzer and Optimizer have multiple rules for `UnaryNode`. After making `EventTimeWatermark` extend `UnaryNode`, we do not need a special handling for `EventTimeWatermark`. ## How was this patch tested? The existing tests Author: gatorsmile <[email protected]> Closes #19913 from gatorsmile/eventtimewatermark.
1 parent 51066b4 commit effca98

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/EventTimeWatermark.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ object EventTimeWatermark {
3838
case class EventTimeWatermark(
3939
eventTime: Attribute,
4040
delay: CalendarInterval,
41-
child: LogicalPlan) extends LogicalPlan {
41+
child: LogicalPlan) extends UnaryNode {
4242

4343
// Update the metadata on the eventTime column to include the desired delay.
4444
override val output: Seq[Attribute] = child.output.map { a =>
@@ -60,6 +60,4 @@ case class EventTimeWatermark(
6060
a
6161
}
6262
}
63-
64-
override val children: Seq[LogicalPlan] = child :: Nil
6563
}

0 commit comments

Comments
 (0)