Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-40382][SQL][TESTS][FOLLOW-UP] Make the tests pass with ANSI enabled #38250

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class RewriteDistinctAggregatesSuite extends PlanTest {
val nullInt = Literal(null, IntegerType)
val nullString = Literal(null, StringType)
val testRelation = LocalRelation($"a".string, $"b".string, $"c".string, $"d".string, $"e".int)
val testRelation2 = LocalRelation($"a".double, $"b".int, $"c".int, $"d".int, $"e".int)

private def checkRewrite(rewrite: LogicalPlan): Unit = rewrite match {
case Aggregate(_, _, Aggregate(_, _, _: Expand)) =>
Expand Down Expand Up @@ -77,7 +78,7 @@ class RewriteDistinctAggregatesSuite extends PlanTest {
}

test("SPARK-40382: eliminate multiple distinct groups due to superficial differences") {
val input = testRelation
val input = testRelation2
.groupBy($"a")(
countDistinct($"b" + $"c").as("agg1"),
countDistinct($"c" + $"b").as("agg2"),
Expand All @@ -92,7 +93,7 @@ class RewriteDistinctAggregatesSuite extends PlanTest {
}

test("SPARK-40382: reduce multiple distinct groups due to superficial differences") {
val input = testRelation
val input = testRelation2
.groupBy($"a")(
countDistinct($"b" + $"c" + $"d").as("agg1"),
countDistinct($"d" + $"c" + $"b").as("agg2"),
Expand Down