Skip to content
Snippets Groups Projects
Commit 4cbf611c authored by gatorsmile's avatar gatorsmile Committed by Reynold Xin
Browse files

[SPARK-16202][SQL][DOC] Correct The Description of CreatableRelationProvider's createRelation

#### What changes were proposed in this pull request?
The API description of `createRelation` in `CreatableRelationProvider` is misleading. The current description only expects users to return the relation.

```Scala
trait CreatableRelationProvider {
  def createRelation(
      sqlContext: SQLContext,
      mode: SaveMode,
      parameters: Map[String, String],
      data: DataFrame): BaseRelation
}
```

However, the major goal of this API should also include saving the `DataFrame`.

Since this API is critical for Data Source API developers, this PR is to correct the description.

#### How was this patch tested?
N/A

Author: gatorsmile <gatorsmile@gmail.com>

Closes #13903 from gatorsmile/readUnderscoreFiles.
parent dd6b7dbe
No related branches found
No related tags found
No related merge requests found
......@@ -148,9 +148,9 @@ trait StreamSinkProvider {
@DeveloperApi
trait CreatableRelationProvider {
/**
* Creates a relation with the given parameters based on the contents of the given
* DataFrame. The mode specifies the expected behavior of createRelation when
* data already exists.
* Save the DataFrame to the destination and return a relation with the given parameters based on
* the contents of the given DataFrame. The mode specifies the expected behavior of createRelation
* when data already exists.
* Right now, there are three modes, Append, Overwrite, and ErrorIfExists.
* Append mode means that when saving a DataFrame to a data source, if data already exists,
* contents of the DataFrame are expected to be appended to existing data.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment