You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/09/03 13:59:20 UTC

[GitHub] [spark] advancedxy commented on a change in pull request #33908: [SPARK-36662][SQL] Special timestamps support for path filters - modifiedBefore/modifiedAfter

advancedxy commented on a change in pull request #33908:
URL: https://github.com/apache/spark/pull/33908#discussion_r701914384



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/PathFilterSuite.scala
##########
@@ -222,6 +222,19 @@ class PathFilterSuite extends QueryTest with SharedSparkSession {
     }
   }
 
+  test("SPARK-36662: special timestamps support for path filters -  modifiedBefore/modifiedAfter") {
+    withTempPath { path =>
+      val dataDir = path.getCanonicalPath
+      Seq("foo").toDS().write.text(dataDir)
+      val df = spark.read.option("modifiedbefore", "yesterday").text(dataDir)
+      assert(df.isEmpty)
+
+      // Both glob pattern in option and path should be effective to filter files.
+      val df2 = spark.read.option("modifiedbefore", "tomorrow").text(dataDir)

Review comment:
       Since the title includes `modifiedBefore/modifiedAfter`, how about change it to `modifiedafter`




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org