wangyum commented on a change in pull request #30525:
URL: https://github.com/apache/spark/pull/30525#discussion_r532045135



##########
File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HivePartitionFilteringSuite.scala
##########
@@ -272,93 +315,105 @@ class HivePartitionFilteringSuite(version: String)
   test("getPartitionsByFilter: chunk contains bb") {
     testMetastorePartitionFiltering(
       attr("chunk").contains("bb"),
-      (20170101 to 20170103, 0 to 4, Seq("bb")) :: Nil)
+      dsValue,
+      hValue,
+      Seq("bb"),
+      dateValue,
+      dateStrValue)
   }
 
   test("getPartitionsByFilter: chunk startsWith b") {
     testMetastorePartitionFiltering(
       attr("chunk").startsWith("b"),
-      (20170101 to 20170103, 0 to 4, Seq("ba", "bb")) :: Nil)
+      dsValue,
+      hValue,
+      Seq("ba", "bb"),
+      dateValue,
+      dateStrValue)
   }
 
   test("getPartitionsByFilter: chunk endsWith b") {
     testMetastorePartitionFiltering(
       attr("chunk").endsWith("b"),
-      (20170101 to 20170103, 0 to 4, Seq("ab", "bb")) :: Nil)
+      dsValue,
+      hValue,
+      Seq("ab", "bb"),
+      dateValue,
+      dateStrValue)
   }
 
   test("getPartitionsByFilter: chunk in ('ab', 'ba') and ((cast(ds as 
string)>'20170102')") {
-    val day = (20170101 to 20170103, 0 to 4, Seq("ab", "ba"))
     testMetastorePartitionFiltering(
       attr("chunk").in("ab", "ba") && (attr("ds").cast(StringType) > 
"20170102"),
-      day :: Nil)
+      dsValue,
+      hValue,
+      Seq("ab", "ba"),
+      dateValue,
+      dateStrValue)
   }
 
-  test("getPartitionsByFilter: date type pruning by metastore") {

Review comment:
       Split it to 4 tests: 
https://github.com/apache/spark/blob/13bcfe2794d84d9f2211625b06b38dc8dc204bd6/sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HivePartitionFilteringSuite.scala#L355-L395




----------------------------------------------------------------
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]

Reply via email to