Skip to content

Commit

Permalink
follow comment
Browse files Browse the repository at this point in the history
  • Loading branch information
AngersZhuuuu committed Apr 3, 2020
1 parent 24e9d4d commit 0d81b4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ class Analyzer(
}
}
}

/**
* Replaces [[UnresolvedAttribute]]s with concrete [[AttributeReference]]s from
* a logical plan node's children.
Expand Down Expand Up @@ -1394,14 +1394,6 @@ class Analyzer(
case f @ Filter(cond, _) if containsAggregate(cond) => f
case q: LogicalPlan =>
logTrace(s"Attempting to resolve ${q.simpleString(SQLConf.get.maxToStringFields)}")
// q.mapExpressions { e =>
// q match {
// case _: Filter if containsAggregate(e) =>
// e
// case _ =>
// resolveExpressionTopDown(e, q)
// }
// }
q.mapExpressions(resolveExpressionTopDown(_, q))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3494,7 +3494,8 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
Seq(Row(Map[Int, Int]()), Row(Map(1 -> 2))))
}

test("SPARK-31334: TypeCoercion should before then ResolveAggregateFunctions") {
test("SPARK-31334: Don't ResolveReference/ResolveMissingReference when " +
"Filter condition with aggregate expression") {
Seq(
(1, 3),
(2, 3),
Expand Down Expand Up @@ -3542,7 +3543,6 @@ class SQLQuerySuite extends QueryTest with SharedSparkSession with AdaptiveSpark
assert(SQLConf.get.getConf(SQLConf.CODEGEN_FALLBACK) === true)
}
}

}

case class Foo(bar: Option[String])

0 comments on commit 0d81b4d

Please sign in to comment.