wForget commented on code in PR #10991:
URL: 
https://github.com/apache/incubator-gluten/pull/10991#discussion_r2488459497


##########
backends-velox/src/main/scala/org/apache/gluten/extension/AppendBatchResizeForShuffleInputAndOutput.scala:
##########
@@ -30,30 +31,50 @@ import 
org.apache.spark.sql.execution.adaptive.{AQEShuffleReadExec, ShuffleQuery
  */
 case class AppendBatchResizeForShuffleInputAndOutput() extends Rule[SparkPlan] 
{
   override def apply(plan: SparkPlan): SparkPlan = {
+    val resizeBatchesShuffleInputEnabled = 
VeloxConfig.get.veloxResizeBatchesShuffleInput
+    val resizeBatchesShuffleOutputEnabled = 
VeloxConfig.get.veloxResizeBatchesShuffleOutput
+    if (!resizeBatchesShuffleInputEnabled && 
!resizeBatchesShuffleOutputEnabled) {
+      return plan
+    }
+
     val range = VeloxConfig.get.veloxResizeBatchesShuffleInputOutputRange
     plan.transformUp {
-      case shuffle: ColumnarShuffleExchangeExec
-          if shuffle.shuffleWriterType == HashShuffleWriterType &&
-            VeloxConfig.get.veloxResizeBatchesShuffleInput =>
+      case ColumnarResizeableShuffleExchangeExec(shuffle) if 
resizeBatchesShuffleInputEnabled =>

Review Comment:
   @marin-ma Thank you for your suggestion, I have updated it. Also, do we need 
to change the default value of `COLUMNAR_VELOX_RESIZE_BATCHES_SHUFFLE_OUTPUT` 
to true?
   
https://github.com/apache/incubator-gluten/blob/95f271d7f683deb9d61fb019806d6d221d0fc6c9/backends-velox/src/main/scala/org/apache/gluten/config/VeloxConfig.scala#L279-L286



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to