compress INTO OUTFILE with parameter compress#27135
Merged
nikitamikhaylov merged 12 commits intoClickHouse:masterfrom Sep 15, 2021
Merged
compress INTO OUTFILE with parameter compress#27135nikitamikhaylov merged 12 commits intoClickHouse:masterfrom
nikitamikhaylov merged 12 commits intoClickHouse:masterfrom
Conversation
add compression key-word and some tests
Co-authored-by: Nikita Mikhaylov <[email protected]>
nikitamikhaylov
approved these changes
Sep 10, 2021
Member
|
@Mergifyio update |
Contributor
|
Command
|
Member
|
@Mergifyio update |
Contributor
|
Command
|
Member
|
|
nikitamikhaylov
approved these changes
Sep 15, 2021
Contributor
|
Internal documentation ticket: DOCSUP-14893 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Add compression for
INTO OUTPUTandFROM INFILEwith additional optional parameter.Detailed description / Documentation draft:
Additional version of #27134 in solving #3473. This version differs from previous be special field
COMPRESSIONthat can be used afterINTO OUTFILE filename COMPRESSION type.Also it improves #27655 by adding compression method.
Description.
Functions
FROM INFILEandINTO OUTFILEcan work with compressed files. By default they will check file name ending to choose correct compression method. But user can also define compression method usingCOMPRESSION. Compression can be'gzip', 'deflate', 'br', 'xz', 'zstd', 'lz4', 'bz2'.Examples
These queries are equal (it can be checked by
gunzipcommand in terminal, but file_without_gz should be copied or moved to file with.gzbecause it can't be parsed bygunzipas gziped file).Also they can be checked by queries:
Both queries will insert "Hello, World!" into table.
Note for docs
It will be great to add documentation for
INSERT INTO TABLE FUNCTION. (https://clickhouse.tech/docs/en/sql-reference/table-functions/s3/#usage-examples -- some examples, #28716 is adding documentation forinsert into table s3, but we have nothing here https://clickhouse.tech/docs/en/sql-reference/statements/insert-into/#insert_query_insert-select)