Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses-you committed Jul 4, 2020
1 parent 0798fca commit 3e116f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ trait CheckAnalysis extends PredicateHelper {
failAnalysis("grouping_id() can only be used with GroupingSets/Cube/Rollup")

case e: Expression if e.children.exists(_.isInstanceOf[WindowFunction]) &&
!e.isInstanceOf[WindowExpression] =>
!e.isInstanceOf[WindowExpression] =>
val w = e.children.find(_.isInstanceOf[WindowFunction]).get
failAnalysis(s"Window function $w requires an OVER clause.")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ class AnalysisSuite extends AnalysisTest with Matchers {
"timestamp <> double at the second column of the second table"))
}

test("throw user facing error when use WindowFunction directly") {
test("SPARK-31975: Throw user facing error when use WindowFunction directly") {
assertAnalysisError(testRelation2.select(RowNumber()),
Seq("Window function row_number() requires an OVER clause."))

Expand Down

0 comments on commit 3e116f5

Please sign in to comment.