Skip to content

Commit

Permalink
update PgAggFuncSupportSuite
Browse files Browse the repository at this point in the history
  • Loading branch information
tminglei committed Oct 17, 2017
1 parent 25906df commit 4ff58eb
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,24 @@ class PgAggFuncSupportSuite extends FunSuite {
).andThen(
DBIO.seq(
tabs.map { t =>
(rank("bar").within(t.name), denseRank("bar").within(t.name), percentRank("bar").within(t.name), cumeDist("bar").within(t.name))
rank("bar").within(t.name)
}.result.map { r =>
assert(List((1, 1, 0.0, 0.6)) === r)
assert(List((1)) === r)
},
tabs.map { t =>
denseRank("bar").within(t.name)
}.result.map { r =>
assert(List((1)) === r)
},
tabs.map { t =>
percentRank("bar").within(t.name)
}.result.map { r =>
assert(List((0.0)) === r)
},
tabs.map { t =>
cumeDist("bar").within(t.name)
}.result.map { r =>
assert(List((0.6)) === r)
}
)
).andFinally(
Expand Down

0 comments on commit 4ff58eb

Please sign in to comment.