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

    https://github.com/apache/spark/pull/16854#discussion_r104309644
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVDataSource.scala
 ---
    @@ -59,11 +58,21 @@ abstract class CSVDataSource extends Serializable {
           sparkSession: SparkSession,
           inputPaths: Seq[FileStatus],
           parsedOptions: CSVOptions): Option[StructType]
    +}
    +
    +object CSVDataSource {
    +  def apply(options: CSVOptions): CSVDataSource = {
    +    if (options.wholeFile) {
    +      WholeFileCSVDataSource
    +    } else {
    +      TextInputCSVDataSource
    +    }
    +  }
     
       /**
        * Generates a header from the given row which is null-safe and 
duplicate-safe.
        */
    -  protected def makeSafeHeader(
    +  def makeSafeHeader(
    --- End diff --
    
    `makeSafeHeader` was moved from `CSVDataSource` class to `CSVDataSource` 
companion object so that this can be accessed in `DataFrameReader`.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to