Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Fixed bug in writing csv with buffer resizing #965

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

ritchie46
Copy link
Collaborator

This fix a bug where we didn't correctly resize the buffer when encoding csv fields. We also remove the loop as it is not needed, we can simply ensure to alloc enough without looping.

Fixes pola-rs/polars#3232

@codecov
Copy link

codecov bot commented Apr 26, 2022

Codecov Report

Merging #965 (3e92f8c) into main (e478619) will increase coverage by 0.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main     #965      +/-   ##
==========================================
+ Coverage   71.42%   71.43%   +0.01%     
==========================================
  Files         355      355              
  Lines       19572    19572              
==========================================
+ Hits        13980    13982       +2     
+ Misses       5592     5590       -2     
Impacted Files Coverage Δ
src/io/csv/write/serialize.rs 62.65% <66.66%> (+1.60%) ⬆️
src/bitmap/utils/slice_iterator.rs 86.20% <0.00%> (-1.73%) ⬇️
src/compute/arithmetics/time.rs 25.68% <0.00%> (-0.92%) ⬇️

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 e478619...3e92f8c. Read the comment docs.

@jorgecarleitao jorgecarleitao added the bug Something isn't working label Apr 26, 2022
@jorgecarleitao jorgecarleitao changed the title fix bug in csv encoding of resized buffer Fixed bug in writing csv with buffer resizing Apr 26, 2022
@jorgecarleitao jorgecarleitao merged commit f981955 into jorgecarleitao:main Apr 26, 2022
ygf11 pushed a commit to ygf11/arrow2 that referenced this pull request Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strings with commas and >= 64 character length breaks quoting with write_csv
2 participants