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 2020/03/01 04:39:47 UTC

[GitHub] [spark] maropu commented on a change in pull request #27749: [SPARK-30997][SQL] An analysis failure in generators with aggregate functions

maropu commented on a change in pull request #27749: [SPARK-30997][SQL] An analysis failure in generators with aggregate functions
URL: https://github.com/apache/spark/pull/27749#discussion_r386076423
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala
 ##########
 @@ -433,6 +433,13 @@ class AnalysisErrorSuite extends AnalysisTest {
       :: Nil
   )
 
+  errorTest(
+    "generator nested in expressions for aggregates",
+    testRelation.select(Explode(CreateArray(min($"a") :: max($"a") :: Nil)) + 1),
+    "Generators are not supported when it's nested in expressions, but got: " +
+      "(explode(array(min(a), max(a))) + 1)" :: Nil
+  )
+
 
 Review comment:
   This is not related to this pr though, I added the two tests here to improve test coverage for https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala#L2209-L2217. Please let me know if there are any problems.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org