Github user chenghao-intel commented on the pull request:

    https://github.com/apache/spark/pull/3780#issuecomment-70767766
  
    Or probably we can cleanup those APIs, kind of like:
    ```
    trait Mode
    object Append extends Mode
    object Create extends Mode
    object CreateOrOverwrite extends Mode
    object CreateOrAppend extends Mode
    
    def outputFile(path: String, format: FileFormat=defaultFormat, mode: Mode = 
CreateOrOverwrite)
    def insertIntoFile(path: String, format: FileFormat) = outputFile(path, 
format, CreateOrOverwrite)
    def toCsv(path: String, mode: Mode) = outputFile(path, CSV, mode)
    def toParquet(path: String, mode: Mode) = outputFile(path, Parquet, mode)
    ```
    Any ideas?


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