Skip to content

Commit

Permalink
Fix issue
Browse files Browse the repository at this point in the history
  • Loading branch information
beliefer committed Nov 26, 2020
1 parent 43e8542 commit 9f29766
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,10 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with SQLConfHelper with Logg
wCtx =>
(wCtx.name.getText, typedVisit[WindowSpec](wCtx.windowSpec))
}
baseWindowTuples.groupBy(_._1).foreach { case (k, v) if v.size > 1 =>
throw new ParseException(s"The definition of window '$k' is repetitive", ctx)
baseWindowTuples.groupBy(_._1).foreach { kv =>
if (kv._2.size > 1) {
throw new ParseException(s"The definition of window '${kv._1}' is repetitive", ctx)
}
}
val baseWindowMap = baseWindowTuples.toMap

Expand Down

0 comments on commit 9f29766

Please sign in to comment.