-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Initial support for Window function #599
Changes from 5 commits
e575d9c
1b174a0
ebd1964
4011198
4a9f605
eb13de2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ import org.apache.spark.sql.execution.datasources.v2.BatchScanExec | |
import org.apache.spark.sql.execution.datasources.v2.parquet.ParquetScan | ||
import org.apache.spark.sql.execution.exchange.{BroadcastExchangeExec, ReusedExchangeExec, ShuffleExchangeExec} | ||
import org.apache.spark.sql.execution.joins.{BroadcastHashJoinExec, ShuffledHashJoinExec, SortMergeJoinExec} | ||
import org.apache.spark.sql.execution.window.WindowExec | ||
import org.apache.spark.sql.internal.SQLConf | ||
import org.apache.spark.sql.types._ | ||
|
||
|
@@ -541,6 +542,17 @@ class CometSparkSessionExtensions | |
withInfo(s, Seq(info1, info2).flatten.mkString(",")) | ||
s | ||
|
||
case w: WindowExec => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. I saw some of the |
||
val newOp = transform1(w) | ||
newOp match { | ||
case Some(nativeOp) => | ||
val cometOp = | ||
CometWindowExec(w, w.windowExpression, w.partitionSpec, w.orderSpec, w.child) | ||
CometSinkPlaceHolder(nativeOp, w, cometOp) | ||
case None => | ||
w | ||
} | ||
|
||
case u: UnionExec | ||
if isCometOperatorEnabled(conf, "union") && | ||
u.children.forall(isCometNative) => | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll create a follow up PR for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#606