Skip to content

Commit cd8bbb2

Browse files
committed
update msg
1 parent 38df40a commit cd8bbb2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ trait CheckAnalysis extends PredicateHelper {
159159
failAnalysis("grouping_id() can only be used with GroupingSets/Cube/Rollup")
160160

161161
case Alias(w: WindowFunction, _) =>
162-
failAnalysis(s"Expression '$w' not supported without a window function.")
162+
failAnalysis(s"Window function '$w' call requires an OVER clause.")
163163

164164
case w @ WindowExpression(AggregateExpression(_, _, true, _, _), _) =>
165165
failAnalysis(s"Distinct window functions are not supported: $w")

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,6 @@ class AnalysisSuite extends AnalysisTest with Matchers {
829829

830830
test("throw user facing error when use WindowFunction directly") {
831831
assertAnalysisError(testRelation2.select(RowNumber()),
832-
Seq("Expression 'row_number()' not supported without a window function."))
832+
Seq("Window function 'row_number()' call requires an OVER clause."))
833833
}
834834
}

0 commit comments

Comments
 (0)