Github user rxin commented on a diff in the pull request: https://github.com/apache/spark/pull/5505#discussion_r28307206 --- 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 -- That's a good point, but I think for that case, the correct behavior should result in a failure during df creation (e.g. during analysis), not when we try to resolve a column later on.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org