Skip to content

Commit 71dda8b

Browse files
fix: Implement producedAttributes for CometWindowExec (#2789)
* Fix 2710 CometWindowExec should correctly account output attributes Co-authored-by: Rahul Babarwal <rahul.babarwal@sumologic.com>
1 parent d47f196 commit 71dda8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spark/src/main/scala/org/apache/spark/sql/comet/CometWindowExec.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ package org.apache.spark.sql.comet
2121

2222
import scala.jdk.CollectionConverters._
2323

24-
import org.apache.spark.sql.catalyst.expressions.{Alias, Attribute, AttributeReference, CurrentRow, Expression, NamedExpression, RangeFrame, RowFrame, SortOrder, SpecifiedWindowFrame, UnboundedFollowing, UnboundedPreceding, WindowExpression}
24+
import org.apache.spark.sql.catalyst.expressions.{Alias, Attribute, AttributeReference, AttributeSet, CurrentRow, Expression, NamedExpression, RangeFrame, RowFrame, SortOrder, SpecifiedWindowFrame, UnboundedFollowing, UnboundedPreceding, WindowExpression}
2525
import org.apache.spark.sql.catalyst.expressions.aggregate.{AggregateExpression, Complete, Count, Max, Min, Sum}
2626
import org.apache.spark.sql.catalyst.plans.physical.Partitioning
2727
import org.apache.spark.sql.execution.SparkPlan
@@ -334,6 +334,7 @@ case class CometWindowExec(
334334
extends CometUnaryExec {
335335

336336
override def nodeName: String = "CometWindowExec"
337+
override def producedAttributes: AttributeSet = outputSet ++ AttributeSet(windowExpression)
337338

338339
override lazy val metrics: Map[String, SQLMetric] = Map(
339340
"dataSize" -> SQLMetrics.createSizeMetric(sparkContext, "data size"),

0 commit comments

Comments
 (0)