Skip to content

Commit

Permalink
UT fix for the window function
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanyuanking committed Apr 23, 2020
1 parent c75fe08 commit d4a011c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2597,6 +2597,9 @@ class Analyzer(
case Filter(condition, _) if hasWindowFunction(condition) =>
failAnalysis("It is not allowed to use window functions inside WHERE and HAVING clauses")

case AggregateWithHaving(condition, _) if hasWindowFunction(condition) =>
failAnalysis("It is not allowed to use window functions inside WHERE and HAVING clauses")

// Aggregate with Having clause. This rule works with an unresolved Aggregate because
// a resolved Aggregate will not have Window Functions.
case f @ AggregateWithHaving(condition, a @ Aggregate(groupingExprs, aggregateExprs, child))
Expand Down

0 comments on commit d4a011c

Please sign in to comment.