Repository: spark
Updated Branches:
refs/heads/master dd6b7dbe7 -> 4cbf611c1
[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 <[email protected]>
Closes #13903 from gatorsmile/readUnderscoreFiles.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/4cbf611c
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/4cbf611c
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/4cbf611c
Branch: refs/heads/master
Commit: 4cbf611c1dc88111ff49d005e902ad5864799ede
Parents: dd6b7db
Author: gatorsmile <[email protected]>
Authored: Mon Jun 27 23:12:17 2016 -0700
Committer: Reynold Xin <[email protected]>
Committed: Mon Jun 27 23:12:17 2016 -0700
----------------------------------------------------------------------
.../main/scala/org/apache/spark/sql/sources/interfaces.scala | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/4cbf611c/sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala
----------------------------------------------------------------------
diff --git
a/sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala
b/sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala
index d2077a0..a16d7ed 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/sources/interfaces.scala
@@ -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.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]