Skip to content
Prev Previous commit
Next Next commit
Replace Symbol usage with $"" in new unit tests
  • Loading branch information
bersprockets committed Oct 11, 2022
commit 484ca8ed206775b4e8bc7ea016c95d2e386d4a9c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ class RewriteDistinctAggregatesSuite extends PlanTest {

test("eliminate multiple distinct groups due to superficial differences") {
val input = testRelation
.groupBy('a)(
countDistinct('b + 'c).as('agg1),
countDistinct('c + 'b).as('agg2),
max('c).as('agg3))
.groupBy($"a")(
countDistinct($"b" + $"c").as("agg1"),
countDistinct($"c" + $"b").as("agg2"),
max($"c").as("agg3"))
.analyze

val rewrite = RewriteDistinctAggregates(input)
Expand All @@ -93,12 +93,12 @@ class RewriteDistinctAggregatesSuite extends PlanTest {

test("reduce multiple distinct groups due to superficial differences") {
val input = testRelation
.groupBy('a)(
countDistinct('b + 'c + 'd).as('agg1),
countDistinct('d + 'c + 'b).as('agg2),
countDistinct('b + 'c).as('agg4),
countDistinct('c + 'b).as('agg4),
max('c).as('agg5))
.groupBy($"a")(
countDistinct($"b" + $"c" + $"d").as("agg1"),
countDistinct($"d" + $"c" + $"b").as("agg2"),
countDistinct($"b" + $"c").as("agg3"),
countDistinct($"c" + $"b").as("agg4"),
max($"c").as("agg5"))
.analyze

val rewrite = RewriteDistinctAggregates(input)
Expand Down