COMPRESSION_CODEC Query Option (CDH 5.2 or higher only)
When Impala writes Parquet data files using the INSERT statement, the underlying compression is controlled by the COMPRESSION_CODEC query option.
Note: Prior to Impala 2.0, this option was named PARQUET_COMPRESSION_CODEC. In Impala 2.0 and later, the PARQUET_COMPRESSION_CODEC name is not recognized. Use the more general name COMPRESSION_CODEC for new code.
Syntax:
SET COMPRESSION_CODEC=codec_name;
The allowed values for this query option are SNAPPY (the default), GZIP, and NONE.
Note: A Parquet file created with COMPRESSION_CODEC=NONE is still
typically smaller than the original data, due to encoding schemes such as run-length encoding and dictionary encoding that are applied separately from compression.
The option value is not case-sensitive.
If the option is set to an unrecognized value, all kinds of queries will fail due to the invalid option setting, not just queries involving Parquet tables. (The value BZIP2 is also recognized, but is not compatible with Parquet tables.)
Type: STRING
Default: SNAPPY
Examples:
set compression_codec=gzip; insert into parquet_table_highly_compressed select * from t1; set compression_codec=snappy; insert into parquet_table_compression_plus_fast_queries select * from t1; set compression_codec=none; insert into parquet_table_no_compression select * from t1; set compression_codec=foo; select * from t1 limit 5; ERROR: Invalid compression codec: foo
For information about how compressing Parquet data files affects query performance, see Snappy and GZip Compression for Parquet Data Files.
Page generated May 18, 2018.
<< BUFFER_POOL_LIMIT Query Option | ©2016 Cloudera, Inc. All rights reserved | COMPUTE_STATS_MIN_SAMPLE_SIZE Query Option >> |
Terms and Conditions Privacy Policy |