GitHub user xuanyuanking opened a pull request:
https://github.com/apache/spark/pull/19941
[SPARK-22753][SQL] Get rid of dataSource.writeAndRead
## What changes were proposed in this pull request?
As the discussion in https://github.com/apache/spark/pull/16481 and
https://github.com/apache/spark/pull/18975#discussion_r155454606
Currently the BaseRelation returned by `dataSource.writeAndRead` only used
in `CreateDataSourceTableAsSelect`, planForWriting and writeAndRead has some
common code paths.
In this patch I removed the writeAndRead function and added the getRelation
function which only use in `CreateDataSourceTableAsSelectCommand` while saving
data to non-existing table.
## How was this patch tested?
Existing UT
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xuanyuanking/spark SPARK-22753
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19941.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #19941
----
commit 14811636692810809033bc7caf03fcecb6939aa3
Author: Yuanjian Li <[email protected]>
Date: 2017-12-11T12:12:45Z
Get rid of dataSource.writeAndRead
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]