Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohahaha committed Oct 30, 2023
1 parent 11e8db0 commit b87ae4d
Showing 1 changed file with 30 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -420,46 +420,44 @@ class VeloxAggregateFunctionsSuite extends VeloxWholeStageTransformerSuite {
}

test("max_by") {
runQueryAndCompare(
s"""
|select max_by(l_linenumber, l_comment) from lineitem;
|""".stripMargin) {
runQueryAndCompare(s"""
|select max_by(l_linenumber, l_comment) from lineitem;
|""".stripMargin) {
checkOperatorMatch[HashAggregateExecTransformer]
}
runQueryAndCompare(
s"""
|select max_by(distinct l_linenumber, l_comment)
|from lineitem
|""".stripMargin) {
df => {
assert(
getExecutedPlan(df).count(
plan => {
plan.isInstanceOf[HashAggregateExecTransformer]
}) == 4)
}
runQueryAndCompare(s"""
|select max_by(distinct l_linenumber, l_comment)
|from lineitem
|""".stripMargin) {
df =>
{
assert(
getExecutedPlan(df).count(
plan => {
plan.isInstanceOf[HashAggregateExecTransformer]
}) == 4)
}
}
}

test("min_by") {
runQueryAndCompare(
s"""
|select min_by(l_linenumber, l_comment) from lineitem;
|""".stripMargin) {
runQueryAndCompare(s"""
|select min_by(l_linenumber, l_comment) from lineitem;
|""".stripMargin) {
checkOperatorMatch[HashAggregateExecTransformer]
}
runQueryAndCompare(
s"""
|select min_by(distinct l_linenumber, l_comment)
|from lineitem
|""".stripMargin) {
df => {
assert(
getExecutedPlan(df).count(
plan => {
plan.isInstanceOf[HashAggregateExecTransformer]
}) == 4)
}
runQueryAndCompare(s"""
|select min_by(distinct l_linenumber, l_comment)
|from lineitem
|""".stripMargin) {
df =>
{
assert(
getExecutedPlan(df).count(
plan => {
plan.isInstanceOf[HashAggregateExecTransformer]
}) == 4)
}
}
}

Expand Down

0 comments on commit b87ae4d

Please sign in to comment.