morvenhuang commented on code in PR #36507:
URL: https://github.com/apache/spark/pull/36507#discussion_r870343693
##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCSuite.scala:
##########
@@ -318,31 +318,31 @@ class JDBCSuite extends QueryTest
}
test("SELECT *") {
- assert(sql("SELECT * FROM foobar").collect().size === 3)
+ assert(sql("SELECT * FROM foobar").count() === 3)
}
test("SELECT * WHERE (simple predicates)") {
- assert(checkPushdown(sql("SELECT * FROM foobar WHERE THEID <
1")).collect().size == 0)
- assert(checkPushdown(sql("SELECT * FROM foobar WHERE THEID !=
2")).collect().size == 2)
- assert(checkPushdown(sql("SELECT * FROM foobar WHERE THEID =
1")).collect().size == 1)
- assert(checkPushdown(sql("SELECT * FROM foobar WHERE NAME =
'fred'")).collect().size == 1)
- assert(checkPushdown(sql("SELECT * FROM foobar WHERE NAME <=>
'fred'")).collect().size == 1)
- assert(checkPushdown(sql("SELECT * FROM foobar WHERE NAME >
'fred'")).collect().size == 2)
- assert(checkPushdown(sql("SELECT * FROM foobar WHERE NAME !=
'fred'")).collect().size == 2)
+ assert(checkPushdown(sql("SELECT * FROM foobar WHERE THEID < 1")).count()
== 0)
Review Comment:
Thanks for the review. Reverted the change in this test case, so that it
won't cause any behavior change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]