Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Mar 25, 2024
1 parent 3255ca3 commit e66f0d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ case class EnumeratedTransform(session: SparkSession, outputsColumnar: Boolean)
with LogLevelUtil {
import EnumeratedTransform._

private val cboRules = Seq(SingleNodeTransformCboRule())
private val cboRules = Seq(SingleNodeTransformCboRule(), ExchangeTransformCboRule())
private val optimization = GlutenOptimization(cboRules)

private val reqConvention = GlutenProperties.Conventions.ANY
Expand Down Expand Up @@ -60,4 +60,16 @@ object EnumeratedTransform {

override def shape(): Shape[SparkPlan] = Shapes.fixedHeight(1)
}

private case class ExchangeTransformCboRule() extends CboRule[SparkPlan] {
private val delegate = TransformPreOverrides.ExchangeTransformRule()


override def shift(node: SparkPlan): Iterable[SparkPlan] = {
val out = List(delegate.apply(node))
out
}

override def shape(): Shape[SparkPlan] = Shapes.fixedHeight(1)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ object MiscColumnarRules {
}

// Exchange transformation.
private case class ExchangeTransformRule() extends Rule[SparkPlan] with LogLevelUtil {
case class ExchangeTransformRule() extends Rule[SparkPlan] with LogLevelUtil {
override def apply(plan: SparkPlan): SparkPlan = plan match {
case plan if TransformHints.isNotTransformable(plan) =>
plan
Expand Down

0 comments on commit e66f0d1

Please sign in to comment.