[TEST][MINOR] Replace repartitionBy with distribute in CollapseRepartitionSuite

## What changes were proposed in this pull request?

Replace non-existent `repartitionBy` with `distribute` in `CollapseRepartitionSuite`.

## How was this patch tested?

local build and `catalyst/testOnly *CollapseRepartitionSuite`

Author: Jacek Laskowski <jacek@japila.pl>

Closes #17657 from jaceklaskowski/CollapseRepartitionSuite.
This commit is contained in:
Jacek Laskowski 2017-04-17 17:58:10 -07:00 committed by Reynold Xin
parent 0075562dd2
commit 33ea908af9

View file

@ -106,8 +106,8 @@ class CollapseRepartitionSuite extends PlanTest {
comparePlans(optimized2, correctAnswer) comparePlans(optimized2, correctAnswer)
} }
test("repartitionBy above repartition") { test("distribute above repartition") {
// Always respects the top repartitionBy amd removes useless repartition // Always respects the top distribute and removes useless repartition
val query1 = testRelation val query1 = testRelation
.repartition(10) .repartition(10)
.distribute('a)(20) .distribute('a)(20)
@ -123,8 +123,8 @@ class CollapseRepartitionSuite extends PlanTest {
comparePlans(optimized2, correctAnswer) comparePlans(optimized2, correctAnswer)
} }
test("repartitionBy above coalesce") { test("distribute above coalesce") {
// Always respects the top repartitionBy amd removes useless coalesce below repartition // Always respects the top distribute and removes useless coalesce below repartition
val query1 = testRelation val query1 = testRelation
.coalesce(10) .coalesce(10)
.distribute('a)(20) .distribute('a)(20)
@ -140,8 +140,8 @@ class CollapseRepartitionSuite extends PlanTest {
comparePlans(optimized2, correctAnswer) comparePlans(optimized2, correctAnswer)
} }
test("repartition above repartitionBy") { test("repartition above distribute") {
// Always respects the top repartition amd removes useless distribute below repartition // Always respects the top repartition and removes useless distribute below repartition
val query1 = testRelation val query1 = testRelation
.distribute('a)(10) .distribute('a)(10)
.repartition(20) .repartition(20)
@ -155,11 +155,10 @@ class CollapseRepartitionSuite extends PlanTest {
comparePlans(optimized1, correctAnswer) comparePlans(optimized1, correctAnswer)
comparePlans(optimized2, correctAnswer) comparePlans(optimized2, correctAnswer)
} }
test("coalesce above repartitionBy") { test("coalesce above distribute") {
// Remove useless coalesce above repartition // Remove useless coalesce above distribute
val query1 = testRelation val query1 = testRelation
.distribute('a)(10) .distribute('a)(10)
.coalesce(20) .coalesce(20)
@ -180,8 +179,8 @@ class CollapseRepartitionSuite extends PlanTest {
comparePlans(optimized2, correctAnswer2) comparePlans(optimized2, correctAnswer2)
} }
test("collapse two adjacent repartitionBys into one") { test("collapse two adjacent distributes into one") {
// Always respects the top repartitionBy // Always respects the top distribute
val query1 = testRelation val query1 = testRelation
.distribute('b)(10) .distribute('b)(10)
.distribute('a)(20) .distribute('a)(20)