[GitHub] [spark] dongjoon-hyun commented on a change in pull request #28841: [SPARK-31962][SQL] Provide option to load files after a specified date when reading from a folder path

2020-06-19 Thread GitBox


dongjoon-hyun commented on a change in pull request #28841:
URL: https://github.com/apache/spark/pull/28841#discussion_r443087420



##
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala
##
@@ -356,26 +380,35 @@ object InMemoryFileIndex extends Logging {
   bulkListLeafFiles(
 dirs.map(_.getPath),
 hadoopConf,
-filter,
+filters,
 session,
-areRootPaths = false
+areRootPaths = false,
+parameters = parameters
   ).flatMap(_._2)
 case _ =>
   dirs.flatMap { dir =>
 listLeafFiles(
   dir.getPath,
   hadoopConf,
-  filter,
+  filters,
   sessionOpt,
   ignoreMissingFiles = ignoreMissingFiles,
   ignoreLocality = ignoreLocality,
-  isRootPath = false)
+  isRootPath = false,
+  parameters = parameters)
   }
   }
+  val fileFilters = (filters ++ FileModifiedDateOption.accept(
+parameters,
+sessionOpt.get,

Review comment:
   You can choose some tests in the following report in order to verify 
your fix. Please push your commit after passing those UT locally.
   - 
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/124247/testReport/





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



[GitHub] [spark] dongjoon-hyun commented on a change in pull request #28841: [SPARK-31962][SQL] Provide option to load files after a specified date when reading from a folder path

2020-06-19 Thread GitBox


dongjoon-hyun commented on a change in pull request #28841:
URL: https://github.com/apache/spark/pull/28841#discussion_r443087259



##
File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/InMemoryFileIndex.scala
##
@@ -356,26 +380,35 @@ object InMemoryFileIndex extends Logging {
   bulkListLeafFiles(
 dirs.map(_.getPath),
 hadoopConf,
-filter,
+filters,
 session,
-areRootPaths = false
+areRootPaths = false,
+parameters = parameters
   ).flatMap(_._2)
 case _ =>
   dirs.flatMap { dir =>
 listLeafFiles(
   dir.getPath,
   hadoopConf,
-  filter,
+  filters,
   sessionOpt,
   ignoreMissingFiles = ignoreMissingFiles,
   ignoreLocality = ignoreLocality,
-  isRootPath = false)
+  isRootPath = false,
+  parameters = parameters)
   }
   }
+  val fileFilters = (filters ++ FileModifiedDateOption.accept(
+parameters,
+sessionOpt.get,

Review comment:
   Hi, @cchighman . This is the root cause of the failure. Could you fix 
and make the tests pass?
   ```
   java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:529)
at scala.None$.get(Option.scala:527)
at 
org.apache.spark.sql.execution.datasources.InMemoryFileIndex$.listLeafFiles(InMemoryFileIndex.scala:403)
   ```





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