Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ class SQLQuerySuite extends QueryTest with BeforeAndAfterAll with SQLTestUtils {
import sqlContext.implicits._
import sqlContext.sql

test("having clause") {
Seq(("one", 1), ("two", 2), ("three", 3), ("one", 5)).toDF("k", "v").registerTempTable("hav")
checkAnswer(
sql("SELECT k, sum(v) FROM hav GROUP BY k HAVING sum(v) > 2"),
Row("one", 6) :: Row("three", 3) :: Nil)
}

test("SPARK-6743: no columns from cache") {
Seq(
(83, 0, 38),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,6 @@ https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C
HiveParser.DecimalLiteral)

/* Case insensitive matches */
val COALESCE = "(?i)COALESCE".r
val COUNT = "(?i)COUNT".r
val SUM = "(?i)SUM".r
val AND = "(?i)AND".r
Expand Down