Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19776#discussion_r152200656
--- Diff: sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala
---
@@ -296,8 +296,33 @@ class JDBCSuite extends SparkFunSuite
// The older versions of spark have this kind of bugs in parquet data
source.
val df1 = sql("SELECT * FROM foobar WHERE NOT (THEID != 2 AND NAME !=
'mary')")
val df2 = sql("SELECT * FROM foobar WHERE NOT (THEID != 2) OR NOT
(NAME != 'mary')")
+ val df3 = sql("SELECT * FROM foobar WHERE (THEID > 0 AND NAME =
'mary') OR (NAME = 'fred')")
+ val df4 = sql("SELECT * FROM foobar " +
+ "WHERE (THEID > 0 AND TRIM(NAME) = 'mary') OR (NAME = 'fred')")
+ val df5 = sql("SELECT * FROM foobar " +
+ "WHERE THEID > 0 AND TRIM(NAME) = 'mary' AND LENGTH(NAME) > 3")
+ val df6 = sql("SELECT * FROM foobar " +
+ "WHERE THEID < 0 OR NAME = 'mary' OR NAME = 'fred'")
+ val df7 = sql("SELECT * FROM foobar " +
+ "WHERE THEID < 0 OR TRIM(NAME) = 'mary' OR NAME = 'fred'")
+ val df8 = sql("SELECT * FROM foobar " +
+ "WHERE NOT((THEID < 0 OR NAME != 'mary') AND (THEID != 1 OR NAME !=
'fred'))")
+ val df9 = sql("SELECT * FROM foobar " +
+ "WHERE NOT((THEID < 0 OR NAME != 'mary') AND (THEID != 1 OR
TRIM(NAME) != 'fred'))")
+ val df10 = sql("SELECT * FROM foobar " +
--- End diff --
why do we need to test so many cases? as an end-to-end test, I think we
only need a typical case.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]