cchighman commented on a change in pull request #28841:
URL: https://github.com/apache/spark/pull/28841#discussion_r468634664



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
##########
@@ -561,6 +564,367 @@ class FileBasedDataSourceSuite extends QueryTest
     }
   }
 
+  test("SPARK-31962 - when modifiedAfter specified " +
+      "with a past date") {
+    withTempDir { dir =>
+      withSQLConf(SQLConf.SESSION_LOCAL_TIMEZONE.key -> "UTC") {
+        val path = new Path(dir.getCanonicalPath)
+        val file = new File(dir, "file1.csv")
+        stringToFile(file, "text")
+        file.setLastModified(DateTimeUtils.currentTimestamp())
+        val df = spark.read
+            .option("modifiedAfter", "2019-05-10T01:11:00")
+            .format("csv")
+            .load(path.toString)
+        assert(df.count() == 1)
+      }
+    }
+  }
+
+  test("SPARK-31962 - when modifiedBefore specified " +
+      "with a future date") {

Review comment:
       Completed

##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
##########
@@ -561,6 +564,367 @@ class FileBasedDataSourceSuite extends QueryTest
     }
   }
 
+  test("SPARK-31962 - when modifiedAfter specified " +
+      "with a past date") {

Review comment:
       Completed

##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
##########
@@ -561,6 +564,367 @@ class FileBasedDataSourceSuite extends QueryTest
     }
   }
 
+  test("SPARK-31962 - when modifiedAfter specified " +
+      "with a past date") {
+    withTempDir { dir =>
+      withSQLConf(SQLConf.SESSION_LOCAL_TIMEZONE.key -> "UTC") {
+        val path = new Path(dir.getCanonicalPath)
+        val file = new File(dir, "file1.csv")

Review comment:
       Six more tests were added.




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to