Skip to content

Commit

Permalink
fix: Comet sink operator should not have children operators
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Feb 15, 2024
1 parent 1630e49 commit d10f356
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 d10f356

Please sign in to comment.