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 2019/04/26 19:18:22 UTC

[GitHub] [spark] mengxr commented on a change in pull request #24473: [SPARK-27534][SQL] Do not load `content` column in binary data source if it is not selected

mengxr commented on a change in pull request #24473: [SPARK-27534][SQL] Do not load `content` column in binary data source if it is not selected
URL: https://github.com/apache/spark/pull/24473#discussion_r279071152
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/binaryfile/BinaryFileFormat.scala
 ##########
 @@ -108,36 +107,19 @@ class BinaryFileFormat extends FileFormat with DataSourceRegister {
       if (pathGlobPattern.forall(new GlobFilter(_).accept(fsPath))) {
         val fs = fsPath.getFileSystem(broadcastedHadoopConf.value.value)
         val fileStatus = fs.getFileStatus(fsPath)
-        val length = fileStatus.getLen
-        val modificationTime = fileStatus.getModificationTime
 
-        if (filterFuncs.forall(_.apply(fileStatus))) {
+        def readContent: Array[Byte] = {
 
 Review comment:
   `readContent()` since it triggers I/O

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


With regards,
Apache Git Services

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