Skip to content
Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Revert "spark-15206 add testcases for distinct aggregate in having cl…
…ause following up PR12974"

This reverts commit 98a1f804d7343ba77731f9aa400c00f1a26c03fe.
  • Loading branch information
xwu0226 committed May 17, 2016
commit 720cc7266f9af6d51ce6bd695505f199e63efec9
Original file line number Diff line number Diff line change
Expand Up @@ -958,69 +958,6 @@ abstract class AggregationQuerySuite extends QueryTest with SQLTestUtils with Te
Row(11) :: Nil)
}
}

test("SPARK-15206: two distinct aggregation with having clause of one distinct aggregation") {
checkAnswer(
sqlContext.sql(
"""
|select key, count(distinct value1), count(distinct value2)
|from agg2 group by key
|having count(distinct value1) > 0
""".stripMargin),
Seq(
Row(null, 3, 3),
Row(1, 2, 3),
Row(2, 2, 1)
)
)
}

test("SPARK-15206: one distinct aggregration with having clause of one distinct aggregation") {
checkAnswer(
sqlContext.sql(
"""
|select key, count(distinct value1)
|from agg2 group by key
|having count(distinct value1) > 0
""".stripMargin),
Seq(
Row(null, 3),
Row(1, 2),
Row(2, 2)
)
)
}

test("SPARK-15206: two distinct aggregration with having clause of two distinct aggregation") {
checkAnswer(
sqlContext.sql(
"""
|select key, count(distinct value1), count(distinct value2)
|from agg2 group by key
|having count(distinct value1) > 0 and count(distinct value2) = 3
""".stripMargin),
Seq(
Row(null, 3, 3),
Row(1, 2, 3)
)
)
}

test("SPARK-15206: two distinct aggregration with having clause of non-distinct aggregation") {
checkAnswer(
sqlContext.sql(
"""
|select key, count(distinct value1), count(distinct value2)
|from agg2 group by key
|having count(value1) > 0
""".stripMargin),
Seq(
Row(null, 3, 3),
Row(1, 2, 3),
Row(2, 2, 1)
)
)
}
}


Expand Down