From b2c8707f818f05816fbd7b914ddb3a511001c98c Mon Sep 17 00:00:00 2001 From: Hongze Zhang Date: Thu, 1 Aug 2024 14:14:35 +0800 Subject: [PATCH] fixup --- .../apache/gluten/utils/VeloxBatchResizerJniWrapper.java | 3 ++- .../apache/gluten/execution/VeloxResizeBatchesExec.scala | 5 ++++- .../scala/org/apache/gluten/execution/TestOperator.scala | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/backends-velox/src/main/java/org/apache/gluten/utils/VeloxBatchResizerJniWrapper.java b/backends-velox/src/main/java/org/apache/gluten/utils/VeloxBatchResizerJniWrapper.java index 2eedb2b2fb35..3011ced2ab37 100644 --- a/backends-velox/src/main/java/org/apache/gluten/utils/VeloxBatchResizerJniWrapper.java +++ b/backends-velox/src/main/java/org/apache/gluten/utils/VeloxBatchResizerJniWrapper.java @@ -36,5 +36,6 @@ public long handle() { return runtime.getHandle(); } - public native long create(int minOutputBatchSize, int maxOutputBatchSize, ColumnarBatchInIterator itr); + public native long create( + int minOutputBatchSize, int maxOutputBatchSize, ColumnarBatchInIterator itr); } diff --git a/backends-velox/src/main/scala/org/apache/gluten/execution/VeloxResizeBatchesExec.scala b/backends-velox/src/main/scala/org/apache/gluten/execution/VeloxResizeBatchesExec.scala index 5b995ca653a6..ba44e6256b42 100644 --- a/backends-velox/src/main/scala/org/apache/gluten/execution/VeloxResizeBatchesExec.scala +++ b/backends-velox/src/main/scala/org/apache/gluten/execution/VeloxResizeBatchesExec.scala @@ -36,7 +36,10 @@ import scala.collection.JavaConverters._ * An operator to coalesce input batches by appending the later batches to the one that comes * earlier. */ -case class VeloxResizeBatchesExec(override val child: SparkPlan, minOutputBatchSize: Int, maxOutputBatchSize: Int) +case class VeloxResizeBatchesExec( + override val child: SparkPlan, + minOutputBatchSize: Int, + maxOutputBatchSize: Int) extends GlutenPlan with UnaryExecNode { diff --git a/backends-velox/src/test/scala/org/apache/gluten/execution/TestOperator.scala b/backends-velox/src/test/scala/org/apache/gluten/execution/TestOperator.scala index fe325f5de59a..fe6ac23908e5 100644 --- a/backends-velox/src/test/scala/org/apache/gluten/execution/TestOperator.scala +++ b/backends-velox/src/test/scala/org/apache/gluten/execution/TestOperator.scala @@ -837,7 +837,8 @@ class TestOperator extends VeloxWholeStageTransformerSuite with AdaptiveSparkPla withSQLConf( "spark.gluten.sql.columnar.backend.velox.resizeBatches.shuffleInput" -> "true", "spark.gluten.sql.columnar.maxBatchSize" -> "2", - "spark.gluten.sql.columnar.backend.velox.resizeBatches.shuffleInput.range" -> s"$minBatchSize~$maxBatchSize" + "spark.gluten.sql.columnar.backend.velox.resizeBatches.shuffleInput.range" -> + s"$minBatchSize~$maxBatchSize" ) { val df = runQueryAndCompare( "select l_orderkey, sum(l_partkey) as sum from lineitem " + @@ -861,7 +862,8 @@ class TestOperator extends VeloxWholeStageTransformerSuite with AdaptiveSparkPla withSQLConf( "spark.gluten.sql.columnar.backend.velox.resizeBatches.shuffleInput" -> "true", "spark.gluten.sql.columnar.maxBatchSize" -> "100", - "spark.gluten.sql.columnar.backend.velox.resizeBatches.shuffleInput.range" -> s"$minBatchSize~$maxBatchSize" + "spark.gluten.sql.columnar.backend.velox.resizeBatches.shuffleInput.range" -> + s"$minBatchSize~$maxBatchSize" ) { val df = runQueryAndCompare( "select l_orderkey, sum(l_partkey) as sum from lineitem " +