Skip to content

Commit 09e4f26

Browse files
committed
fix scalastyle line length in test comments
Co-authored-by: Isaac
1 parent 7a1236b commit 09e4f26

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/OptimizerSuite.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ case class NonDeterministicRuntimeReplaceable(child: Expression)
7777
* A test-only [[RuntimeReplaceable]] that opts out of eager replacement and whose `replacement`
7878
* contains a `CURRENT_LIKE` expression ([[CurrentTimestamp]]) but is deterministic, evaluable, and
7979
* non-foldable (it also reads an input column). Used to check that `ReplaceExpressions` still
80-
* rewrites it eagerly: the replacement depends on the later `ComputeCurrentTime` rule, which matches
81-
* the `CURRENT_LIKE` tree pattern that a survivor would hide, so the `eagerReplace = false` opt-out
82-
* must be overridden.
80+
* rewrites it eagerly: the replacement depends on the later `ComputeCurrentTime` rule, which
81+
* matches the `CURRENT_LIKE` tree pattern that a survivor would hide, so the `eagerReplace = false`
82+
* opt-out must be overridden.
8383
*/
8484
case class CurrentTimeRuntimeReplaceable(child: Expression)
8585
extends RuntimeReplaceable with UnaryLike[Expression] {
@@ -467,13 +467,13 @@ class OptimizerSuite extends PlanTest {
467467

468468
// The replacement contains `CurrentTimestamp` (a CURRENT_LIKE node) but is deterministic,
469469
// evaluable, and non-foldable (it reads an input column), so it would otherwise survive
470-
// `ReplaceExpressions`. A survivor exposes only the RUNTIME_REPLACEABLE pattern of its children,
471-
// not the CURRENT_LIKE pattern of its hidden replacement, so `ComputeCurrentTime` (which runs
472-
// right after and prunes on CURRENT_LIKE) could not reach the `CurrentTimestamp` to fold it into
473-
// a single query-start literal -- leaving it to be evaluated per row at execution and yielding
474-
// different values within one query. The gate forces eager replacement, exposing CURRENT_LIKE so
475-
// it is folded here. The child is an attribute (not a literal) so constant folding cannot mask
476-
// the problem.
470+
// `ReplaceExpressions`. A survivor exposes only the RUNTIME_REPLACEABLE pattern of its
471+
// children, not the CURRENT_LIKE pattern of its hidden replacement, so `ComputeCurrentTime`
472+
// (which runs right after and prunes on CURRENT_LIKE) could not reach the `CurrentTimestamp`
473+
// to fold it into a single query-start literal -- leaving it to be evaluated per row at
474+
// execution and yielding different values within one query. The gate forces eager
475+
// replacement, exposing CURRENT_LIKE so it is folded here. The child is an attribute (not a
476+
// literal) so constant folding cannot mask the problem.
477477
assert(!optimized.expressions.exists(_.exists(_.isInstanceOf[RuntimeReplaceable])),
478478
s"Expected the CURRENT_LIKE RuntimeReplaceable to be rewritten eagerly:\n$optimized")
479479
assert(!optimized.expressions.exists(_.exists(_.isInstanceOf[CurrentTimestamp])),

sql/core/src/test/scala/org/apache/spark/sql/execution/MaterializeRuntimeReplaceableSuite.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ class MaterializeRuntimeReplaceableSuite extends QueryTest with SharedSparkSessi
242242

243243
test("SPARK-57512: a surviving equi-join predicate RuntimeReplaceable is extracted as a " +
244244
"join key") {
245-
// Disable broadcast so the only equi-join plan is a sort-merge join; without key extraction the
246-
// join degrades to a `CartesianProductExec`. Disable AQE so the join operator is directly on the
247-
// executed plan rather than inside an `AdaptiveSparkPlanExec` subtree.
245+
// Disable broadcast so the only equi-join plan is a sort-merge join; without key extraction
246+
// the join degrades to a `CartesianProductExec`. Disable AQE so the join operator is directly
247+
// on the executed plan rather than inside an `AdaptiveSparkPlanExec` subtree.
248248
withSQLConf(
249249
SQLConf.AUTO_BROADCASTJOIN_THRESHOLD.key -> "-1",
250250
SQLConf.ADAPTIVE_EXECUTION_ENABLED.key -> "false") {
@@ -260,8 +260,8 @@ class MaterializeRuntimeReplaceableSuite extends QueryTest with SharedSparkSessi
260260
optimized.expressions.exists(_.exists(_.isInstanceOf[RuntimeReplaceable])),
261261
s"Expected a surviving RuntimeReplaceable join condition:\n$optimized")
262262

263-
// `ExtractEquiJoinKeys` unfolds the survivor and extracts the join key, so a sort-merge join
264-
// is planned. Without the unfold the equality is invisible and the join degrades to a
263+
// `ExtractEquiJoinKeys` unfolds the survivor and extracts the join key, so a sort-merge
264+
// join is planned. Without the unfold the equality is invisible and the join degrades to a
265265
// Cartesian product (the same gap fails stream-stream join analysis with "without equality
266266
// predicate", since `StreamingJoinStrategy` shares this extractor).
267267
val executed = df.queryExecution.executedPlan

0 commit comments

Comments
 (0)