Skip to content
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

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

Merged
merged 3 commits into from
Aug 5, 2019

Conversation

srowen
Copy link
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
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
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
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

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
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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants