Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/11316#discussion_r53726965
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LocalRelation.scala
---
@@ -45,6 +45,9 @@ object LocalRelation {
case class LocalRelation(output: Seq[Attribute], data: Seq[InternalRow] =
Nil)
extends LeafNode with analysis.MultiInstanceRelation {
+ // A local relation must have resolved output.
+ require(output.forall(_.resolved), "Unresolved attributes found when
constructing LocalRelation.")
--- End diff --
The reported error was `cannot resolve 'i' given input columns: []` which
is pretty confusing since every node in the plan does actually have `output`.
The reason for this error was we were constructing a `LocalRelation` that
itself was unresolved. Since this isn't a valid plan, I added this check to
force an earlier failure.
---
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]