Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/5505#discussion_r28349026
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
---
@@ -117,6 +117,15 @@ abstract class LogicalPlan extends
QueryPlan[LogicalPlan] with Logging {
resolve(name, children.flatMap(_.output), resolver, throwErrors)
/**
+ * Optionally resolves the given string (`name`) to a
[[NamedExpression]] using the input
+ * from all child nodes of this LogicalPlan. The given string is
considered a string literal,
+ * i.e. the string itself should match the attribute name and the
attribute name alone.
+ */
+ def resolveQuoted(name: String, resolver: Resolver):
Option[NamedExpression] = {
+ output.find { attribute => resolver(name, attribute.name) }
--- End diff --
You can't always know if something is going to be ambiguous when you create
the DataFrame as it might only be ambiguous at query time due to a setting like
case sensitivity.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]