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

    https://github.com/apache/spark/pull/18810#discussion_r132347018
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/AggregateBenchmark.scala
 ---
    @@ -301,6 +301,61 @@ class AggregateBenchmark extends BenchmarkBase {
         */
       }
     
    +  ignore("max function length of wholestagecodegen") {
    +    val N = 20 << 15
    +
    +    val benchmark = new Benchmark("max function length of 
wholestagecodegen", N)
    +    def f(): Unit = sparkSession.range(N)
    +      .selectExpr(
    +        "id",
    +        "(id & 1023) as k1",
    +        "cast(id & 1023 as double) as k2",
    +        "cast(id & 1023 as int) as k3",
    +        "case when id > 100 and id <= 200 then 1 else 0 end as v1",
    +        "case when id > 200 and id <= 300 then 1 else 0 end as v2",
    +        "case when id > 300 and id <= 400 then 1 else 0 end as v3",
    +        "case when id > 400 and id <= 500 then 1 else 0 end as v4",
    +        "case when id > 500 and id <= 600 then 1 else 0 end as v5",
    +        "case when id > 600 and id <= 700 then 1 else 0 end as v6",
    +        "case when id > 700 and id <= 800 then 1 else 0 end as v7",
    +        "case when id > 800 and id <= 900 then 1 else 0 end as v8",
    +        "case when id > 900 and id <= 1000 then 1 else 0 end as v9",
    +        "case when id > 1000 and id <= 1100 then 1 else 0 end as v10",
    +        "case when id > 1100 and id <= 1200 then 1 else 0 end as v11",
    +        "case when id > 1200 and id <= 1300 then 1 else 0 end as v12",
    +        "case when id > 1300 and id <= 1400 then 1 else 0 end as v13",
    +        "case when id > 1400 and id <= 1500 then 1 else 0 end as v14",
    +        "case when id > 1500 and id <= 1600 then 1 else 0 end as v15",
    +        "case when id > 1600 and id <= 1700 then 1 else 0 end as v16",
    +        "case when id > 1700 and id <= 1800 then 1 else 0 end as v17",
    +        "case when id > 1800 and id <= 1900 then 1 else 0 end as v18")
    +      .groupBy("k1", "k2", "k3")
    +      .sum()
    +      .collect()
    +
    +    benchmark.addCase(s"codegen = F") { iter =>
    +      sparkSession.conf.set("spark.sql.codegen.wholeStage", "false")
    +      f()
    +    }
    +
    +    benchmark.addCase(s"codegen = T") { iter =>
    +      sparkSession.conf.set("spark.sql.codegen.wholeStage", "true")
    +      sparkSession.conf.set("spark.sql.codegen.MaxFunctionLength", "10000")
    --- End diff --
    
    Ok, I have added a test use the default number 1500, thanks.


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