This is an automated email from the ASF dual-hosted git repository.
hongze pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 9315835274 [CORE] Avoid formatted comments from being messed by
non-spotless linters (especially IDE linters) (#7989)
9315835274 is described below
commit 9315835274b803da6f18499a2ea071a79ec5263a
Author: Hongze Zhang <[email protected]>
AuthorDate: Wed Nov 20 08:34:36 2024 +0800
[CORE] Avoid formatted comments from being messed by non-spotless linters
(especially IDE linters) (#7989)
---
.../spark/sql/execution/ColumnarCachedBatchSerializer.scala | 4 ++--
.../extension/columnar/heuristic/ExpandFallbackPolicy.scala | 11 +++++------
.../org/apache/spark/sql/execution/GlutenExplainUtils.scala | 6 ++----
.../org/apache/spark/sql/execution/GlutenImplicits.scala | 5 +++--
4 files changed, 12 insertions(+), 14 deletions(-)
diff --git
a/backends-velox/src/main/scala/org/apache/spark/sql/execution/ColumnarCachedBatchSerializer.scala
b/backends-velox/src/main/scala/org/apache/spark/sql/execution/ColumnarCachedBatchSerializer.scala
index d6e7aa5b22..6fd346f64c 100644
---
a/backends-velox/src/main/scala/org/apache/spark/sql/execution/ColumnarCachedBatchSerializer.scala
+++
b/backends-velox/src/main/scala/org/apache/spark/sql/execution/ColumnarCachedBatchSerializer.scala
@@ -46,7 +46,7 @@ case class CachedColumnarBatch(
bytes: Array[Byte])
extends CachedBatch {}
-// spotless:off
+// format: off
/**
* Feature:
* 1. This serializer supports column pruning
@@ -75,7 +75,7 @@ case class CachedColumnarBatch(
* - Deserializer DefaultCachedBatch -> InternalRow (unsupport ColumnarToRow)
* -> Convert DefaultCachedBatch to InternalRow using vanilla Spark
serializer
*/
-// spotless:on
+// format: on
class ColumnarCachedBatchSerializer extends CachedBatchSerializer with
SQLConfHelper with Logging {
private lazy val rowBasedCachedBatchSerializer = new
DefaultCachedBatchSerializer
diff --git
a/gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/heuristic/ExpandFallbackPolicy.scala
b/gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/heuristic/ExpandFallbackPolicy.scala
index d6e674bbf2..e1c8b6f41f 100644
---
a/gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/heuristic/ExpandFallbackPolicy.scala
+++
b/gluten-substrait/src/main/scala/org/apache/gluten/extension/columnar/heuristic/ExpandFallbackPolicy.scala
@@ -31,7 +31,8 @@ import
org.apache.spark.sql.execution.columnar.InMemoryTableScanExec
import org.apache.spark.sql.execution.command.ExecutedCommandExec
import org.apache.spark.sql.execution.exchange.Exchange
-// spotless:off
+
+// format: off
/**
* Note, this rule should only fallback to row-based plan if there is no harm.
* The follow case should be handled carefully
@@ -64,7 +65,7 @@ import org.apache.spark.sql.execution.exchange.Exchange
* @param isAdaptiveContext If is inside AQE
* @param originalPlan The vanilla SparkPlan without apply gluten transform
rules
*/
-// spotless:on
+// format: on
case class ExpandFallbackPolicy(isAdaptiveContext: Boolean, originalPlan:
SparkPlan)
extends Rule[SparkPlan] {
import ExpandFallbackPolicy._
@@ -106,14 +107,13 @@ case class ExpandFallbackPolicy(isAdaptiveContext:
Boolean, originalPlan: SparkP
transitionCost
}
+ // format: off
/**
* When making a stage fall back, it's possible that we need a ColumnarToRow
to adapt to last
* stage's columnar output. So we need to evaluate the cost, i.e., the
number of required
* ColumnarToRow between entirely fallback stage and last stage(s). Thus, we
can avoid possible
* performance degradation caused by fallback policy.
*
- * spotless:off
- *
* Spark plan before applying fallback policy:
*
* ColumnarExchange
@@ -136,9 +136,8 @@ case class ExpandFallbackPolicy(isAdaptiveContext: Boolean,
originalPlan: SparkP
* Project
*
* So by considering the cost, the fallback policy will not be applied.
- *
- * spotless:on
*/
+ // format: on
private def countStageFallbackTransitionCost(plan: SparkPlan): Int = {
var stageFallbackTransitionCost = 0
diff --git
a/gluten-substrait/src/main/scala/org/apache/spark/sql/execution/GlutenExplainUtils.scala
b/gluten-substrait/src/main/scala/org/apache/spark/sql/execution/GlutenExplainUtils.scala
index fa697789c8..d6167c931c 100644
---
a/gluten-substrait/src/main/scala/org/apache/spark/sql/execution/GlutenExplainUtils.scala
+++
b/gluten-substrait/src/main/scala/org/apache/spark/sql/execution/GlutenExplainUtils.scala
@@ -147,15 +147,13 @@ object GlutenExplainUtils extends AdaptiveSparkPlanHelper
{
}
}
- // spotless:off
- // scalastyle:off
+ // format: off
/**
* Given a input physical plan, performs the following tasks.
* 1. Generates the explain output for the input plan excluding the
subquery plans. 2. Generates
* the explain output for each subquery referenced in the plan.
*/
- // scalastyle:on
- // spotless:on
+ // format: on
def processPlan[T <: QueryPlan[T]](
plan: T,
append: String => Unit,
diff --git
a/gluten-substrait/src/main/scala/org/apache/spark/sql/execution/GlutenImplicits.scala
b/gluten-substrait/src/main/scala/org/apache/spark/sql/execution/GlutenImplicits.scala
index 4ecc674d4b..435bf9239e 100644
---
a/gluten-substrait/src/main/scala/org/apache/spark/sql/execution/GlutenImplicits.scala
+++
b/gluten-substrait/src/main/scala/org/apache/spark/sql/execution/GlutenImplicits.scala
@@ -36,7 +36,8 @@ import org.apache.spark.sql.internal.SQLConf
import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer
-// spotless:off
+
+// format: off
/**
* A helper class to get the Gluten fallback summary from a Spark [[Dataset]].
*
@@ -52,7 +53,7 @@ import scala.collection.mutable.ArrayBuffer
* df.fallbackSummary
* }}}
*/
-// spotless:on
+// format: on
object GlutenImplicits {
case class FallbackSummary(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]