Skip to content

Commit

Permalink
Fixed the testcase issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ravipesala committed Sep 23, 2014
1 parent bad2fd0 commit f8ace79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class SqlParser extends StandardTokenParsers with PackratParsers {
grpExprs: Seq[Expression],
projExprs: Seq[Expression]): Seq[NamedExpression] = {
grpExprs.zipWithIndex.map {
case (ne: NamedExpression, _) => ne
case (e, i) =>
var aliasForGrp:NamedExpression = null
projExprs.foreach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,5 @@ class SQLQuerySuite extends QueryTest with BeforeAndAfterAll {
test("SPARK-3371 Renaming a function expression with group by gives error") {
registerFunction("len", (s: String) => s.length)
checkAnswer(
sql("SELECT len(value) as temp FROM testData WHERE key = 1 group by len(value)"),
Seq(Seq("1")))
}
sql("SELECT len(value) as temp FROM testData WHERE key = 1 group by len(value)"), 1)}
}

0 comments on commit f8ace79

Please sign in to comment.