Skip to content

Commit

Permalink
fix: Comet sink operator should not have children operators (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya authored Feb 15, 2024
1 parent 2e3614d commit 50470bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ class CometSparkSessionExtensions
case Some(nativeOp) =>
val cometOp = CometUnionExec(u, u.children)
CometSinkPlaceHolder(nativeOp, u, cometOp)
case None => u
}

case op =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1698,6 +1698,10 @@ object QueryPlanSerde extends Logging with ShimQueryPlanSerde {

if (scanTypes.length == op.output.length) {
scanBuilder.addAllFields(scanTypes.asJava)

// Sink operators don't have children
result.clearChildren()

Some(result.setScan(scanBuilder).build())
} else {
// There are unsupported scan type
Expand Down

0 comments on commit 50470bd

Please sign in to comment.