cloud-fan commented on a change in pull request #31646:
URL: https://github.com/apache/spark/pull/31646#discussion_r592169121
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HivePartitionFilteringSuite.scala
##########
@@ -418,6 +418,107 @@ class HivePartitionFilteringSuite(version: String)
dateStrValue)
}
+ test("getPartitionsByFilter: not in/inset string type") {
+ def check(condition: Expression, result: Seq[String]): Unit = {
+ testMetastorePartitionFiltering(
+ condition,
+ dsValue,
+ hValue,
+ result,
+ dateValue,
+ dateStrValue
+ )
+ }
+
+ check(
+ Not(In(attr("chunk"), Seq(Literal("aa"), Literal("ab")))),
+ Seq("ba", "bb")
+ )
+ check(
+ Not(In(attr("chunk"), Seq(Literal("aa"), Literal("ab"), Literal(null)))),
+ chunkValue
Review comment:
yea, this test can detect the correctness bug about null handing.
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HivePartitionFilteringSuite.scala
##########
@@ -418,6 +418,107 @@ class HivePartitionFilteringSuite(version: String)
dateStrValue)
}
+ test("getPartitionsByFilter: not in/inset string type") {
+ def check(condition: Expression, result: Seq[String]): Unit = {
+ testMetastorePartitionFiltering(
+ condition,
+ dsValue,
+ hValue,
+ result,
+ dateValue,
+ dateStrValue
+ )
+ }
+
+ check(
+ Not(In(attr("chunk"), Seq(Literal("aa"), Literal("ab")))),
+ Seq("ba", "bb")
+ )
+ check(
+ Not(In(attr("chunk"), Seq(Literal("aa"), Literal("ab"), Literal(null)))),
+ chunkValue
Review comment:
yea, this test can detect the correctness bug about null handling.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]