From f645924553b577ae0ba3f9ce9a34cbfd29fe79ca Mon Sep 17 00:00:00 2001 From: "wangguangxin.cn" Date: Wed, 26 Jun 2024 11:50:27 +0800 Subject: [PATCH] fix --- .../gluten/extension/columnar/OffloadSingleNode.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gluten-core/src/main/scala/org/apache/gluten/extension/columnar/OffloadSingleNode.scala b/gluten-core/src/main/scala/org/apache/gluten/extension/columnar/OffloadSingleNode.scala index df3915c62ba92..9c7db0488bd4a 100644 --- a/gluten-core/src/main/scala/org/apache/gluten/extension/columnar/OffloadSingleNode.scala +++ b/gluten-core/src/main/scala/org/apache/gluten/extension/columnar/OffloadSingleNode.scala @@ -369,13 +369,13 @@ case class OffloadWindow() extends OffloadSingleNode with LogLevelUtil { private val replace = new ReplaceSingleNode() override def offload(plan: SparkPlan): SparkPlan = plan match { - case window: WindowExec => + case window: WindowExec if BackendsApiManager.getSettings.requiredChildOrderingForWindow() => if (TransformHints.isNotTransformable(window)) { return window } - val transformer = replace.doReplace(window) - val newChild = transformer.children.head match { + val transformer = replace.doReplace(window).asInstanceOf[UnaryTransformSupport] + val newChild = transformer.child match { case SortExec(_, false, child, _) if outputOrderSatisfied(child, transformer.requiredChildOrdering.head) => child