You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/01/22 01:54:26 UTC
[GitHub] [spark] bersprockets commented on a change in pull request #35232: [SPARK-37947][SQL] Extract generator from GeneratorOuter expression contained by a Generate operator.
bersprockets commented on a change in pull request #35232:
URL: https://github.com/apache/spark/pull/35232#discussion_r790088220
##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -2801,6 +2801,11 @@ class Analyzer(override val catalogManager: CatalogManager)
p
}
+ case g @ Generate(GeneratorOuter(generator), _, _, _, _, _) =>
+ g.copy(generator = generator,
Review comment:
Thanks for reviewing!
>nit: g.copy(generator = generator, outer = true)
Ah yes, I will make the change.
>How about queries like this? select * from values 1, 2 lateral view outer explode_outer(array()) as b;
On master:
```
spark-sql> select * from values 1, 2 lateral view outer explode_outer(array()) as b;
Error in query: Column 'b' does not exist. Did you mean one of the following? [col1]; line 1 pos 26;
'Project [*]
+- 'Generate generatorouter(explode(array())), true, as, ['b]
+- LocalRelation [col1#0]
spark-sql>
```
With the PR:
```
spark-sql> select * from values 1, 2 lateral view outer explode_outer(array()) as b;
1 NULL
2 NULL
Time taken: 3.734 seconds, Fetched 2 row(s)
spark-sql>
```
I can add it to the test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org