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

feat: COPY my_table TO STDOUT BINARY #271

Merged
merged 54 commits into from
Jul 11, 2022
Merged

Conversation

olavloite
Copy link
Collaborator

Adds support for COPY my_table TO STDOUT BINARY. The binary copy format is
slightly more efficient than the text format, and has does not need any
escaping of special valuesa, as there is no field delimiter or line terminator
involved.

Adds support for COPY my_table FROM STDIN BINARY. The binary format can
be more efficient and is also immune to problems with escaping null
values etc. The binary format is however only usable when copying
to/from tables with exactly the same columns.
@codecov
Copy link

codecov bot commented Jul 9, 2022

Codecov Report

Merging #271 (08c606f) into postgresql-dialect (7155783) will increase coverage by 0.17%.
The diff coverage is 95.60%.

@@                   Coverage Diff                    @@
##             postgresql-dialect     #271      +/-   ##
========================================================
+ Coverage                 82.11%   82.29%   +0.17%     
- Complexity                 1260     1277      +17     
========================================================
  Files                       102      102              
  Lines                      4355     4410      +55     
  Branches                    539      548       +9     
========================================================
+ Hits                       3576     3629      +53     
  Misses                      598      598              
- Partials                    181      183       +2     
Flag Coverage Δ
all_tests 82.29% <95.60%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...le/cloud/spanner/pgadapter/utils/CopyInParser.java 60.00% <ø> (ø)
.../spanner/pgadapter/statements/CopyToStatement.java 95.65% <93.47%> (-0.27%) ⬇️
...spanner/pgadapter/wireoutput/CopyDataResponse.java 93.61% <97.43%> (+13.61%) ⬆️
...er/pgadapter/statements/IntermediateStatement.java 95.34% <100.00%> (+0.05%) ⬆️
...loud/spanner/pgadapter/utils/BinaryCopyParser.java 91.50% <100.00%> (-0.08%) ⬇️
...spanner/pgadapter/wireprotocol/ControlMessage.java 88.14% <100.00%> (-0.13%) ⬇️

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 7155783...08c606f. Read the comment docs.

@olavloite olavloite marked this pull request as ready for review July 11, 2022 18:44
@olavloite olavloite merged commit d8c4c77 into postgresql-dialect Jul 11, 2022
@olavloite olavloite deleted the copy-out-binary branch July 11, 2022 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant