Github user bersprockets commented on a diff in the pull request:
https://github.com/apache/spark/pull/21621#discussion_r197623576
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala ---
@@ -556,6 +556,17 @@ class DataFrameFunctionsSuite extends QueryTest with
SharedSQLContext {
checkAnswer(df8.selectExpr("arrays_zip(v1, v2)"), expectedValue8)
}
+ test("SPARK-24633: arrays_zip splits input processing correctly") {
+ Seq("true", "false").foreach { wholestageCodegenEnabled =>
+ withSQLConf(SQLConf.WHOLESTAGE_CODEGEN_ENABLED.key ->
wholestageCodegenEnabled) {
+ val df = spark.range(1)
+ val exprs = (0 to 5).map(x => array($"id" + lit(x)))
--- End diff --
This wasn't splitting input processing for me. Maybe
splitExpressionsWithCurrentInputs has a bigger threshold than splitExpressions.
Even at 90, it still had not split the input processing. At 100, it finally
did. So someplace between 90 and 100, it starts splitting.
I might be looking at the wrong thing. Check at your end.
<pre>
val exprs = (0 to 100).map(x => array($"id" + lit(x)))
checkAnswer(df.select(arrays_zip(exprs: _*)),
Row(Seq(Row(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41,
42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 61, 62,
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
79, 80, 81, 82, 83,
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
100))))
</pre>
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]