Github user dilipbiswal commented on a diff in the pull request:
https://github.com/apache/spark/pull/11497#discussion_r55021069
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
---
@@ -350,4 +350,18 @@ class AnalysisSuite extends AnalysisTest {
assertAnalysisSuccess(query)
}
+
+ test("SPARK-13651: generator outputs shouldn't be resolved from its
child's output") {
+ val input = LocalRelation('key.string, 'value.string)
+ val generatorInput = 'a.map(StringType, IntegerType)
+
+ val query =
+ input
+ .generate(Explode(generatorInput), join = true,
--- End diff --
@cloud-fan Thank you. You are right. Wenchen, i just realized that its
pretty hard to simulate the error in AnalysisSuite. For this problem to happen,
we need to have the rules fired in following sequence.
1. First ResolveGenerate be a no-op because the generator is not resolved.
2. Generator is resolved through ResolveFunction.
3. ResolveReference now resolves the generator output attributes from
child;s output
in AnalysisSuite we have an empty function registry thus i am unable to
simulate this error in this
test. If you are ok, i am thinking of removing this test and getting it
tested through SQLQuerySuite.
Please let me know what you think.
---
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]