Skip to content

Commit b43de07

Browse files
fix
1 parent f907b5b commit b43de07

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/exchange/EnsureRequirementsSuite.scala

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,10 +1280,6 @@ class EnsureRequirementsSuite extends SharedSparkSession {
12801280
SortExec(_, _, ShuffleExchangeExec(_: HashPartitioning, _, _, _), _),
12811281
SortExec(_, _, _: DummySparkPlan, _), _) =>
12821282
// Left side shuffled, right side kept as-is
1283-
case SortMergeJoinExec(_, _, _, _,
1284-
SortExec(_, _, _: DummySparkPlan, _),
1285-
SortExec(_, _, ShuffleExchangeExec(_: HashPartitioning, _, _, _), _), _) =>
1286-
// Right side shuffled, left side kept as-is
12871283
case other => fail(s"Expected shuffle on at least one side, but got: $other")
12881284
}
12891285
}
@@ -1387,35 +1383,6 @@ class EnsureRequirementsSuite extends SharedSparkSession {
13871383
}
13881384
}
13891385

1390-
test("ShufflePartitionIdPassThrough - cross position matching behavior") {
1391-
withSQLConf(SQLConf.SHUFFLE_PARTITIONS.key -> "10") {
1392-
// Left partitioned by exprA, right partitioned by exprB
1393-
// Both sides join on (exprA, exprB)
1394-
// Test if cross-position matching works: left partition key exprA matches right join key
1395-
// exprA (pos 0)
1396-
// and right partition key exprB matches left join key exprB (pos 1)
1397-
val leftPlan = DummySparkPlan(
1398-
outputPartitioning = ShufflePartitionIdPassThrough(DirectShufflePartitionID(exprA), 5))
1399-
val rightPlan = DummySparkPlan(
1400-
outputPartitioning = ShufflePartitionIdPassThrough(DirectShufflePartitionID(exprB), 5))
1401-
val join = SortMergeJoinExec(exprA :: exprB :: Nil, exprA :: exprB :: Nil, Inner, None,
1402-
leftPlan, rightPlan)
1403-
1404-
EnsureRequirements.apply(join) match {
1405-
case SortMergeJoinExec(_, _, _, _,
1406-
SortExec(_, _, ShuffleExchangeExec(p1: HashPartitioning, _, _, _), _),
1407-
SortExec(_, _, ShuffleExchangeExec(p2: HashPartitioning, _, _, _), _), _) =>
1408-
assert(p1.numPartitions == 10)
1409-
assert(p2.numPartitions == 10)
1410-
assert(p1.expressions == Seq(exprA, exprB))
1411-
assert(p2.expressions == Seq(exprA, exprB))
1412-
case other => fail(s"Expected either no shuffles (if compatible) or shuffles on " +
1413-
s"both sides, but got: $other")
1414-
}
1415-
}
1416-
}
1417-
1418-
14191386
def years(expr: Expression): TransformExpression = {
14201387
TransformExpression(YearsFunction, Seq(expr))
14211388
}

0 commit comments

Comments
 (0)