HyukjinKwon commented on a change in pull request #32583:
URL: https://github.com/apache/spark/pull/32583#discussion_r737028997
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HivePartitionFilteringSuite.scala
##########
@@ -577,6 +578,60 @@ class HivePartitionFilteringSuite(version: String)
dateStrValue)
}
+ test("getPartitionsByFilter: substr(chunk,0,1)=a") {
+ Seq("true" -> Seq("aa", "ab"), "false" -> chunkValue).foreach { t =>
+ withSQLConf(pruningFastFallback -> t._1) {
+ testMetastorePartitionFiltering(
+ Substring(attr("chunk"), Literal(0), Literal(1)) === "a",
+ dsValue,
+ hValue,
+ t._2,
+ dateValue,
+ dateStrValue)
+ }
+ }
+ }
+
+ test("getPartitionsByFilter: year(d)=2019") {
+ Seq("true" -> Seq("2019-01-01", "2019-01-02", "2019-01-03"),
+ "false" -> dateValue).foreach { t =>
+ withSQLConf(pruningFastFallback -> t._1) {
+ testMetastorePartitionFiltering(
+ Year(attr("d")) === 2019,
+ dsValue,
+ hValue,
+ chunkValue,
+ t._2,
+ dateStrValue)
+ }
+ }
+ }
+
+ test("getPartitionsByFilter: datestr=concat(2020-,01-,01)") {
+ Seq("true" -> Seq("2020-01-01"), "false" -> dateStrValue).foreach { t =>
+ withSQLConf(pruningFastFallback -> t._1) {
+ testMetastorePartitionFiltering(
+ attr("datestr") === Concat(Seq("2020-", "01-", "01")),
+ dsValue,
+ hValue,
+ chunkValue,
+ dateValue,
+ t._2)
+ }
+ }
+ }
+
+ test(s"getPartitionsByFilter: ds=20170101 when $fallbackKey=true") {
Review comment:
<img width="1310" alt="Screen Shot 2021-10-27 at 10 05 30 AM"
src="https://user-images.githubusercontent.com/6477701/138982797-2a0eaced-b910-4ca4-afd9-eda6ae04cc94.png">
Let me revert this to keep the builds able to pass for now since the
flakiness seems obvious. Please let me know if I am mistaken here.
--
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]