Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

Better handle rows that break across splits, and other small related fixes#400

Merged
HyukjinKwon merged 3 commits intodatabricks:masterfrom
srowen:Issue398
Aug 5, 2019
Merged

Better handle rows that break across splits, and other small related fixes#400
HyukjinKwon merged 3 commits intodatabricks:masterfrom
srowen:Issue398

Conversation

@srowen
Copy link
Copy Markdown
Collaborator

@srowen srowen commented Aug 4, 2019

This attempt to address #398
See also #399

The change is I believe explained in comments below.

Copy link
Copy Markdown
Collaborator Author

@srowen srowen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not super happy about the hack here, but I could not find any other way around it. This is a potential correctness issue, so we need to do something. At least, I added more tests to exercise handling of rows that split across splits, and they still pass.

reader = new InputStreamReader(in, charset)

if (codec == null) {
// Hack: in the uncompressed case (see more below), we must know how much the
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea ... I don't like this hack too ... but seems no better way.

Copy link
Copy Markdown
Member

@HyukjinKwon HyukjinKwon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good if the styles and tests pass

@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 5, 2019

Codecov Report

Merging #400 into master will decrease coverage by 0.05%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #400      +/-   ##
==========================================
- Coverage   87.78%   87.73%   -0.06%     
==========================================
  Files          14       14              
  Lines         745      758      +13     
  Branches       64       65       +1     
==========================================
+ Hits          654      665      +11     
- Misses         91       93       +2
Impacted Files Coverage Δ
...cala/com/databricks/spark/xml/XmlInputFormat.scala 92.53% <83.33%> (-0.86%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41d0d17...9584634. Read the comment docs.

@HyukjinKwon HyukjinKwon merged commit 8bc9621 into databricks:master Aug 5, 2019
@srowen
Copy link
Copy Markdown
Collaborator Author

srowen commented Aug 5, 2019

Thanks @HyukjinKwon - we may want to cut an 0.6.0 release for this, plus the inferSchema change. I may need to learn from you how to do it.

@srowen srowen modified the milestones: 0.5.1, 0.6.0 Aug 5, 2019
@srowen srowen deleted the Issue398 branch October 28, 2019 00:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants