-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-13108][SQL] Support for ascii compatible encodings at CSV data source #11016
[SPARK-13108][SQL] Support for ascii compatible encodings at CSV data source #11016
Conversation
Test build #50533 has finished for PR 11016 at commit
|
cc @rxin |
retest this please |
Test build #50739 has finished for PR 11016 at commit
|
Test build #50741 has finished for PR 11016 at commit
|
I think the approach looks good if it was only an issue for csv. But if you want to fix it in a more general way, it makes more sense to move |
@falaki Thanks. Then, I will try to generalize this and then change the title as well with some more commits. |
@falaki It looks JSON and TEXT data sources don't support |
Test build #51919 has finished for PR 11016 at commit
|
Test build #52153 has finished for PR 11016 at commit
|
retest this please |
Test build #52157 has finished for PR 11016 at commit
|
Test build #52635 has finished for PR 11016 at commit
|
I just found a similar issue with this, SPARK-1849. I think we might have to do not support non-ascii compatible encodings because it looks this PR will support general encodings but I cannot guarantee it supports all the encodings. I mean, this will support general encodings but there might be some encodings writing a BOM-bits-like header. Since Spark CSV is already supporting the encoding option, I cannot come up with more than three options below:
@srowen Would you maybe give some feedback please? |
What changes were proposed in this pull request?
https://issues.apache.org/jira/browse/SPARK-13108
CSV datasource currently does not support non-ascii compatible encodings.
I tested this in Max OS. I converted
cars_iso-8859-1.csv
intocars_utf-16.csv
as below:and run the codes below:
This produces a wrong results below:
(For more details, please check the Jira issue ticket).
So, this PR let this datasource adds the support for the encodings
Unittests were added for
CSVSuite
for end-to-end test.How was the this patch tested?
This was tested with unittests and with
dev/run_tests
for coding style