Uh oh!
There was an error while loading. Please reload this page.
[SPARK-34432][SQL][TESTS] Add JavaSimpleWritableDataSource - #31560
[SPARK-34432][SQL][TESTS] Add JavaSimpleWritableDataSource#31560kevincmchen wants to merge 9 commits into
Conversation
…e writable data source in `DataSourceV2Suite` ### What changes were proposed in this pull request? This is a followup of #19269 In #19269 , there is only a scala implementation of simple writable data source in `DataSourceV2Suite`. This PR adds a java implementation of it. ### Why are the changes needed? To improve test coverage. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? existing testsuites
HyukjinKwon
commented
Feb 16, 2021
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Thank you for making your first contribution. I left a few general comments.
Uh oh!
There was an error while loading. Please reload this page.
cloud-fan
commented
Feb 17, 2021
ok to test |
SparkQA
commented
Feb 17, 2021
Kubernetes integration test starting |
SparkQA
commented
Feb 17, 2021
Kubernetes integration test status success |
SparkQA
commented
Feb 17, 2021
Test build #135199 has finished for PR 31560 at commit
|
delete duplicated blank Lines in `JavaSimpleWritableDataSource`
SparkQA
commented
Feb 18, 2021
Kubernetes integration test starting |
SparkQA
commented
Feb 18, 2021
Kubernetes integration test status failure |
SparkQA
commented
Feb 18, 2021
Kubernetes integration test starting |
SparkQA
commented
Feb 18, 2021
Kubernetes integration test status failure |
SparkQA
commented
Feb 18, 2021
Test build #135230 has finished for PR 31560 at commit
|
SparkQA
commented
Feb 18, 2021
Test build #135231 has finished for PR 31560 at commit
|
| return new InputPartition[0]; | ||
| } | ||
| } catch (IOException e) { | ||
| throw new RuntimeException(e); |
There was a problem hiding this comment.
This seems not java friendly, I think we should update Batch#planInputPartitions to add throws IOException, the same as PartitionReader#next.
The throws clause is a compile-time check and won't break binary compatibility. Also cc @rdblue
There was a problem hiding this comment.
I have some different opinions recently.
- for
Batch#planInputPartitions, If this method fails (by throwing an exception), the underlying data source scan may require manual cleanup . - for
BatchWrite#commit, If this method fails (by throwing an exception), this writing job is considered to have been failed, andBatchWrite#abortwould be called,butBatchWrite#abortmay not be able to deal with it. more details, pls see the comments ofBatchWrite#abort
so its better to deal with these exceptions in Batch#planInputPartitions and BatchWrite#commit;
Uh oh!
There was an error while loading. Please reload this page.
SparkQA
commented
Feb 20, 2021
Kubernetes integration test starting |
…rom JavaSimpleBatchTable and override the function capabilities in MyTable
SparkQA
commented
Feb 20, 2021
Kubernetes integration test status failure |
SparkQA
commented
Feb 20, 2021
Kubernetes integration test starting |
SparkQA
commented
Feb 20, 2021
Kubernetes integration test status success |
SparkQA
commented
Feb 20, 2021
Test build #135307 has finished for PR 31560 at commit
|
SparkQA
commented
Feb 20, 2021
Test build #135310 has finished for PR 31560 at commit
|
SparkQA
commented
Feb 20, 2021
Test build #135313 has finished for PR 31560 at commit
|
SparkQA
commented
Feb 21, 2021
Kubernetes integration test starting |
SparkQA
commented
Feb 21, 2021
Kubernetes integration test status failure |
SparkQA
commented
Feb 21, 2021
Test build #135320 has finished for PR 31560 at commit
|
SparkQA
commented
Feb 21, 2021
Test build #135322 has finished for PR 31560 at commit
|
| @Override | ||
| public String keyPrefix() { | ||
| return "javaSimpleWritableDataSource"; |
There was a problem hiding this comment.
Seems like we don't need to implement SessionConfigSupport. Can you open a follow-up PR to remove it from both the Scala and Java versions?
| Object[] objects = | ||
| Arrays.stream(currentLine.split(",")) | ||
| .map(String::trim) | ||
| .map(Integer::parseInt) |
There was a problem hiding this comment.
can we change the Scala version as well in a follow-up PR?
There was a problem hiding this comment.
ok,i'll change the scala version
cloud-fan
commented
Feb 22, 2021
thanks, merging to master! |
cloud-fan
commented
Feb 22, 2021
@kevincmchen can you open a new PR to add |
kevincmchen
commented
Feb 22, 2021
ok, all right. |
### What changes were proposed in this pull request? This is a followup of #31560, In #31560, we added `JavaSimpleWritableDataSource ` and left some little problems like unused interface `SessionConfigSupport` 、 inconsistent schema between `JavaSimpleWritableDataSource ` and `SimpleWritableDataSource`. This PR fixes the remaining problems in #31560. ### Why are the changes needed? 1. `SessionConfigSupport` in `JavaSimpleWritableDataSource ` and `SimpleWritableDataSource` is never used, so we don't need to implement it. 2. change the schema of `SimpleWritableDataSource`, to match `TestingV2Source` ### Does this PR introduce _any_ user-facing change? NO ### How was this patch tested? existing testsuites Closes#31621 from kevincmchen/SPARK-34498. Authored-by: kevincmchen <kevincmchen@tencent.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
What changes were proposed in this pull request?
This is a followup of #19269
In #19269 , there is only a scala implementation of simple writable data source in
DataSourceV2Suite.This PR adds a java implementation of it.
Why are the changes needed?
To improve test coverage.
Does this PR introduce any user-facing change?
No
How was this patch tested?
existing testsuites