Skip to content

Commit 3e92d32

Browse files
use the selectExpr in unit test intead of SQLQuery
1 parent 3c729aa commit 3e92d32

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

sql/core/src/test/scala/org/apache/spark/sql/DataFrameFunctionsSuite.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,9 @@ class DataFrameFunctionsSuite extends QueryTest {
9999
val l = if (v == null) null else v.length
100100
Row(l, l)
101101
})
102-
}
103-
104-
test("length in SQL") {
105-
nullStrings.registerTempTable("null_strings")
106102

107103
checkAnswer(
108-
ctx.sql("SELECT length(s) FROM null_strings"),
104+
nullStrings.selectExpr("length(s)"),
109105
nullStrings.collect().toSeq.map { r =>
110106
val v = r.getString(1)
111107
val l = if (v == null) null else v.length

0 commit comments

Comments
 (0)