Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
remove project from wscg when it's the child of window (#1136)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackylee-ch authored Oct 21, 2022
1 parent e143acb commit 00ed950
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,12 @@ case class ColumnarCollapseCodegenStages(
case plan: ColumnarCodegenSupport if enableProjectionCodegen && supportCodegen(plan) =>
ColumnarWholeStageCodegenExec(insertInputAdapter(plan))(
codegenStageCounter.incrementAndGet())
// Remove ColumnarConditionProjectExec from WSCG,
// otherwise ColumnarWindowExec will receive empty RecordBatch and run failed.
case plan @ ColumnarWindowExec(_, _, _, _, child: ColumnarConditionProjectExec)
if supportCodegen(child) && existsJoins(child) =>
val newChild = child.withNewChildren(child.children.map(insertWholeStageCodegen))
plan.withNewChildren(Seq(newChild))
case plan: ColumnarCodegenSupport if supportCodegen(plan) && existsJoins(plan) =>
ColumnarWholeStageCodegenExec(insertInputAdapter(plan))(
codegenStageCounter.incrementAndGet())
Expand Down

0 comments on commit 00ed950

Please sign in to comment.