-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
importccl: support option to compress output files using gzip #45978
Conversation
Currently still work in progress |
22a6005
to
713ca1d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Thanks for picking it up!
A few comments inline.
As far as testing, i think you can just duplicate one of the existing tests, for example: |
1d20e51
to
01cafe2
Compare
thanks will add UT based on that example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Just a few final nits inline.
I think you can ignore the red CI for the moment: the testrace failure is known flake (#45919) and the lint failure is just enforcing the 2 week code freeze.
pkg/ccl/importccl/exportcsv.go
Outdated
@@ -160,12 +245,16 @@ func (sp *csvWriter) Run(ctx context.Context) { | |||
} | |||
defer es.Close() | |||
|
|||
size := buf.Len() | |||
size := writer.Len() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't we need to move this after .Close()
below to include the flushed buf / trailer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, yes, it has to be after close to count on footers as well.
1783eff
to
2c303b8
Compare
understood and make sense 👍 |
Thank for taking this on! Code looks good to go once master re-opens, though it looks like you might need to While you're at it, if you were so inclined, could you amend the commit message so the initial line has a colon after the package, and so it mentions EXPORT e.g. Other than that though, I think this can merge once we re-open master in the next week or two to new features. Thanks again! |
2cabe80
to
0f03079
Compare
it seems that I've mistakenly forced push from master rather than development branch, which causes to auto-close pull-request. at any rate that wasn't intentional, pushed alternative one here: #46405 managed to update and reopen |
@C0rWin with the 20.1 branch cut today, we're about ready to re-open master to merging feature PRs. If you are some inclined, want to give this a quick rebase (and run |
let me rebase and try. |
@dt running
also seems after rebasing UT fails in TeamCity due to some issue with protos. |
yeah, I think you want to check in those diffs as well -- a change to one proto can change all the generated ones and you just need to check in the generated diff as well. The CI is failing in the check that re-running generation produces no diffs. |
39886d5
to
9a981cc
Compare
Unit test fails due to:
test in failure does it make sense to just re-run UT? |
This commit extends EXPORT functionality by enabling compression of the exported stream as suggested in cockroachdb#45579. Currently only gzip is supported and the export clause to use compression looks as following: ``` export into csv 's3://export.csv' with compression = gzip from select * from foo; ``` Signed-off-by: Artem Barger <[email protected]> Release note (sql change): support option to compress output files using gzip Release justification: none
Whoops, sorry, the |
Oh, nevermind, looks like it passed! Thanks again for sticking with this though a rough couple weeks in our dev cycle. bors r=dt |
Build succeeded |
Fix #45579
This commit extends EXPORT functionality by enabling compression of the
exported stream as suggested in #45579. Currently only gzip is supported
and the export clause to use compression looks as following:
Signed-off-by: Artem Barger [email protected]
Release note (sql change): support option to compress output files using
gzip