zhztheplayer commented on code in PR #9035:
URL: https://github.com/apache/incubator-gluten/pull/9035#discussion_r2039855045


##########
backends-velox/src/main/scala/org/apache/gluten/config/VeloxConfig.scala:
##########
@@ -34,16 +34,19 @@ class VeloxConfig(conf: SQLConf) extends GlutenConfig(conf) 
{
   def veloxResizeBatchesShuffleInput: Boolean =
     getConf(COLUMNAR_VELOX_RESIZE_BATCHES_SHUFFLE_INPUT)
 
+  def veloxResizeBatchesShuffleOutput: Boolean =
+    getConf(COLUMNAR_VELOX_RESIZE_BATCHES_SHUFFLE_OUTPUT)
+
   case class ResizeRange(min: Int, max: Int) {
     assert(max >= min)
     assert(min > 0, "Min batch size should be larger than 0")
     assert(max > 0, "Max batch size should be larger than 0")
   }
 
-  def veloxResizeBatchesShuffleInputRange: ResizeRange = {
+  def veloxResizeBatchesShuffleInputOutputRange: ResizeRange = {

Review Comment:
   ditto



##########
backends-velox/src/main/scala/org/apache/gluten/config/VeloxConfig.scala:
##########
@@ -306,6 +317,21 @@ object VeloxConfig {
       .intConf
       .createOptional
 
+  val COLUMNAR_VELOX_RESIZE_BATCHES_SHUFFLE_INPUT_OUTPUT_MIN_SIZE =

Review Comment:
   `s/SHUFFLE_INPUT_OUTPUT/SHUFFLE_OUTPUT` ?



##########
backends-velox/src/main/scala/org/apache/gluten/extension/AppendBatchResizeAfterShuffleRead.scala:
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.gluten.extension
+
+import org.apache.gluten.config.VeloxConfig
+import org.apache.gluten.execution.VeloxResizeBatchesExec
+
+import org.apache.spark.sql.catalyst.rules.Rule
+import org.apache.spark.sql.execution.{ColumnarShuffleExchangeExec, SparkPlan}
+import org.apache.spark.sql.execution.adaptive.{AQEShuffleReadExec, 
ShuffleQueryStageExec}
+
+case class AppendBatchResizeAfterShuffleRead() extends Rule[SparkPlan] {

Review Comment:
   We don't have a rule for the resizing on the input side of shuffle. Can we 
make the ways of optimizations more consistent? Either both via rules, or both 
not?



##########
backends-velox/src/main/scala/org/apache/gluten/config/VeloxConfig.scala:
##########
@@ -294,6 +297,14 @@ object VeloxConfig {
       .booleanConf
       .createWithDefault(true)
 
+  val COLUMNAR_VELOX_RESIZE_BATCHES_SHUFFLE_OUTPUT =
+    
buildConf("spark.gluten.sql.columnar.backend.velox.resizeBatches.shuffleOutput")
+      .internal()
+      .doc(s"If true, combine small columnar batches together right after 
shuffle read. " +
+        s"The default minimum output batch size is equal to 0.8 * 
${COLUMNAR_MAX_BATCH_SIZE.key}")

Review Comment:
   Is 0.8 out-of-date? I see it's now 0.25. Can you update it in passing?



-- 
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