GitHub user xuchuanyin opened a pull request:
https://github.com/apache/carbondata/pull/2835
[CARBONDATA-3029][Test] Fix errors in spark datasource tests in windows env
In current SparkCarbonDataSourceTest, the path specified in creating
table and writer in windows env looks like '\D:\xx\xx', this will cause
test failure such as "java.lang.IllegalArgumentException: Can not create
a Path from an empty string".
Here in this commit, we fixed this problem by normalizing the path and
convert the separator in path to unix style using carbon's FileFactory.
Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:
- [x] Any interfaces changed?
`NO`
- [x] Any backward compatibility impacted?
`NO`
- [x] Document update required?
`NO`
- [x] Testing done
Please provide details on
- Whether new unit test cases have been added or why no new tests
are required?
`Updated tests`
- How it is tested? Please attach test report.
`Tested in local machine`
- Is it a performance related change? Please attach the performance
test report.
`NA`
- Any additional information to help reviewers in testing this
change.
`NA`
- [x] For large changes, please consider breaking it into sub-tasks under
an umbrella JIRA.
`NA`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/xuchuanyin/carbondata
181019_bug_spark_ds_windows_error
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/carbondata/pull/2835.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 #2835
----
commit 4ad528ef7fa289584d653c4dbb16c5c5a2b2f217
Author: xuchuanyin <xuchuanyin@...>
Date: 2018-10-19T03:42:30Z
Fix errors in spark datasource tests in windows env
In current SparkCarbonDataSourceTest, the path specified in creating
table and writer in windows env looks like '\D:\xx\xx', this will cause
test failure such as "java.lang.IllegalArgumentException: Can not create
a Path from an empty string".
Here in this commit, we fixed this problem by normalizing the path and
convert the separator in path to unix style using carbon's FileFactory.
----
---