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

    https://github.com/apache/spark/pull/11947#discussion_r57656806
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVOptions.scala
 ---
    @@ -101,3 +125,14 @@ private[sql] class CSVOptions(
     
       val rowSeparator = "\n"
     }
    +
    +object CSVOptions {
    +
    +  /** Used for convenient construction in unit tests */
    +  def apply(): CSVOptions = new CSVOptions(Map.empty)
    --- End diff --
    
    For me, I a bit hesitated if this `CSVOptions` companion object is only 
used in unit tests.
    
    I'd just use `new CSVOptions(Map("key" -> "value"))` or `new 
CSVOptions(Map.empty)` in tests.
    Otherwise, I'd just make this object in the tests if this object is 
required for some reasons or just make a function in tests for convenient 
construction.


---
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