File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
sql/core/src/test/scala/org/apache/spark/sql/jdbc Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ class JDBCSuite extends SparkFunSuite
637637 assert(doCompileFilter(GreaterThanOrEqual (" col0" , 3 )) === """ "col0" >= 3""" )
638638 assert(doCompileFilter(In (" col1" , Array (" jkl" ))) === """ "col1" IN ('jkl')""" )
639639 assert(doCompileFilter(In (" col1" , Array .empty)) ===
640- " CASE WHEN col1 IS NULL THEN NULL ELSE FALSE END" )
640+ """ CASE WHEN " col1" IS NULL THEN NULL ELSE FALSE END"" " )
641641 assert(doCompileFilter(Not (In (" col1" , Array (" mno" , " pqr" ))))
642642 === """ (NOT ("col1" IN ('mno', 'pqr')))""" )
643643 assert(doCompileFilter(IsNull (" col1" )) === """ "col1" IS NULL""" )
@@ -855,6 +855,8 @@ class JDBCSuite extends SparkFunSuite
855855 assert(sql(" SELECT * FROM mixedCaseCols WHERE Name LIKE '%re%'" ).collect().size == 1 )
856856 assert(sql(" SELECT * FROM mixedCaseCols WHERE Name IS NULL" ).collect().size == 1 )
857857 assert(sql(" SELECT * FROM mixedCaseCols WHERE Name IS NOT NULL" ).collect().size == 2 )
858+ assert(sql(" SELECT * FROM mixedCaseCols" )
859+ .filter($" Name" .isin(Array [String ]() : _* )).collect().size == 0 )
858860 assert(sql(" SELECT * FROM mixedCaseCols WHERE Name IN ('mary', 'fred')" ).collect().size == 2 )
859861 assert(sql(" SELECT * FROM mixedCaseCols WHERE Name NOT IN ('fred')" ).collect().size == 1 )
860862 assert(sql(" SELECT * FROM mixedCaseCols WHERE Id = 1 OR Name = 'mary'" ).collect().size == 2 )
You can’t perform that action at this time.
0 commit comments