Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13065#discussion_r88630739
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/WholeStageCodegenSuite.scala
 ---
    @@ -113,4 +117,25 @@ class WholeStageCodegenSuite extends SparkPlanTest 
with SharedSQLContext {
             
p.asInstanceOf[WholeStageCodegenExec].child.isInstanceOf[HashAggregateExec]).isDefined)
         assert(ds.collect() === Array(("a", 10.0), ("b", 3.0), ("c", 1.0)))
       }
    +
    +  test("generate should be included in WholeStageCodegen") {
    +    import org.apache.spark.sql.functions._
    +    val ds = spark.range(2).select(
    +      col("id"),
    +      explode(array(col("id") + 1, col("id") + 2)).as("value"))
    +    val plan = ds.queryExecution.executedPlan
    +    assert(plan.find(p =>
    +      p.isInstanceOf[WholeStageCodegenExec] &&
    +        
p.asInstanceOf[WholeStageCodegenExec].child.isInstanceOf[GenerateExec]).isDefined)
    +    assert(ds.collect() === Array(Row(0, 1), Row(0, 2), Row(1, 2), Row(1, 
3)))
    +  }
    +
    +  test("large inline generate should fail in WholeStageCodegen") {
    --- End diff --
    
    Yeah it still falls back like it should (I tested that manually). The 
problem is that the fallback code path is not testable at the moment. So I am 
currently testing if inline fails for large inline cases, assuming that the 
fallback works.


---
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

Reply via email to