aboutsummaryrefslogtreecommitdiff
path: root/sql/catalyst
diff options
context:
space:
mode:
authorWenchen Fan <cloud0fan@163.com>2015-10-13 17:11:22 -0700
committerMichael Armbrust <michael@databricks.com>2015-10-13 17:11:22 -0700
commite170c22160bb452f98c340489ebf8390116a8cbb (patch)
tree2a7cd40d6eccb133b587751f4ff7dae2390aa759 /sql/catalyst
parent328d1b3e4bc39cce653342e04f9e08af12dd7ed8 (diff)
downloadspark-e170c22160bb452f98c340489ebf8390116a8cbb.tar.gz
spark-e170c22160bb452f98c340489ebf8390116a8cbb.tar.bz2
spark-e170c22160bb452f98c340489ebf8390116a8cbb.zip
[SPARK-11032] [SQL] correctly handle having
We should not stop resolving having when the having condtion is resolved, or something like `count(1)` will crash. Author: Wenchen Fan <cloud0fan@163.com> Closes #9105 from cloud-fan/having.
Diffstat (limited to 'sql/catalyst')
-rw-r--r--sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
index f5597a08d3..041ab22827 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
@@ -553,7 +553,7 @@ class Analyzer(
def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
case filter @ Filter(havingCondition,
aggregate @ Aggregate(grouping, originalAggExprs, child))
- if aggregate.resolved && !filter.resolved =>
+ if aggregate.resolved =>
// Try resolving the condition of the filter as though it is in the aggregate clause
val aggregatedCondition =