Github user ueshin commented on a diff in the pull request:
https://github.com/apache/spark/pull/21208#discussion_r186014334
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala ---
@@ -798,6 +798,156 @@ class DataFrameFunctionsSuite extends QueryTest with
SharedSQLContext {
}
}
+ test("array_repeat function") {
+ val dummyFilter = (c: Column) => c.isNull || c.isNotNull // to switch
codeGen on
+ val strDF = Seq(
+ ("hi", 1),
+ (null, 2)
+ ).toDF("a", "b")
+
+ checkAnswer(
+ strDF.select(array_repeat(strDF("a"), 0)),
--- End diff --
nit: maybe `$"a"` form is preferred to `df("a")`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]