Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/19559#discussion_r147318866
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -783,6 +783,37 @@ class Analyzer(
}
}
+ /**
+ * Literal functions do not require the user to specify braces when
calling them
+ * When an attributes is not resolvable, we try to resolve it as a
literal function.
+ */
+ private def resolveAsLiteralFunctions(
+ nameParts: Seq[String],
+ attribute: UnresolvedAttribute,
+ plan: LogicalPlan): Option[Expression] = {
+ if (nameParts.length != 1) {
+ return None
+ }
+ val isNamedExpression = plan match {
+ case a @ Aggregate(_, aggs, _) if (aggs.contains(attribute)) =>
+ true
+ case p @ Project(projList, _) if (projList.contains(attribute)) =>
+ true
+ case _ =>
--- End diff --
Miss `Windows`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]