Github user marmbrus commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11646#discussion_r55881083
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala ---
    @@ -454,19 +454,60 @@ trait FileFormat {
           requiredColumns: Array[String],
           filters: Array[Filter],
           bucketSet: Option[BitSet],
    -      inputFiles: Array[FileStatus],
    +      inputFiles: Seq[FileStatus],
           broadcastedConf: Broadcast[SerializableConfiguration],
           options: Map[String, String]): RDD[InternalRow]
    +
    +  /**
    +   * Returns a function that can be used to read a single file in as an 
Iterator of InternalRow.
    +   *
    +   * @param partitionSchema The schema of the partition column row that 
will be present in each
    +   *                        PartitionedFile.  These columns should be 
prepended to the rows that
    +   *                        are produced by the iterator.
    +   * @param dataSchema The schema of the data that should be output for 
each row.  This may be a
    +   *                   subset of the columns that are present in the file 
if  column pruning has
    +   *                   occurred.
    +   * @param filters A set of filters than can optionally be used to reduce 
the number of rows output
    +   * @param options A set of string -> string configuration options.
    +   * @return
    +   */
    +  def buildReader(
    +      sqlContext: SQLContext,
    +      partitionSchema: StructType,
    +      dataSchema: StructType,
    +      filters: Seq[Filter],
    +      options: Map[String, String]): PartitionedFile => 
Iterator[InternalRow] = {
    --- End diff --
    
    @rxin @nongli 
    
    Should we make this our own iterator (i.e. w/ `close()` w/o `hasNext())?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to