Skip to content

Commit

Permalink
[MINOR][VL] Simplify code for PartialProjectRule (#8273)
Browse files Browse the repository at this point in the history
  • Loading branch information
zml1206 authored Dec 23, 2024
1 parent b8279f9 commit f7f801a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ case class PartialProjectRule(spark: SparkSession) extends Rule[SparkPlan] {
plan.transformUp {
case plan: ProjectExec =>
val transformer = ColumnarPartialProjectExec.create(plan)
if (transformer.doValidate().ok()) {
if (transformer.child.asInstanceOf[ColumnarPartialProjectExec].doValidate().ok()) {
transformer
} else plan
if (
transformer.doValidate().ok() &&
transformer.child.asInstanceOf[ColumnarPartialProjectExec].doValidate().ok()
) {
transformer
} else plan
case p => p
}
}
}

0 comments on commit f7f801a

Please sign in to comment.