Files
impala/testdata/workloads/functional-query/queries/QueryTest/unsupported-compression-partitions.test
Tim Armstrong f4f28d310c IMPALA-6941: load more text scanner compression plugins
Add extensions for LZ4 and ZSTD (which are supported by Hadoop).
Even without a plugin this results in better behaviour because
we don't try to treat the files with unknown extensions as
uncompressed text.

Also allow loading tables containing files with unsupported
compression types. There was weird behaviour before we knew
of the file extension but didn't support querying the table -
the catalog would load the table but the impalad would fail
processing the catalog update. The simplest way to fix it
is to just allow loading the tables.

Similarly, make the "LOAD DATA" operation more permissive -
we can copy files into a directory even if we can't
decompress them.

Switch to always checking plugin version - running mismatched plugin
is inherently unsafe.

Testing:
Positive case where LZO is loaded is exercised. Added
coverage for negative case where LZO is disabled.

Fixed test gaps:
* Querying LZO table with LZO plugin not available.
* Interacting with tables with known but unsupported text
  compressions.
* Querying files with unknown compression suffixes (which are
  treated as uncompressed text).

Change-Id: If2a9c4a4a11bed81df706e9e834400bfedfe48e6
Reviewed-on: http://gerrit.cloudera.org:8080/10165
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2018-05-18 03:44:46 +00:00

29 lines
687 B
Plaintext

====
---- QUERY
# Test that querying only partitions with supported formats works as expected.
select count(*)
from multi_text_compression where month <= 2
---- TYPES
BIGINT
---- RESULTS
590
====
---- QUERY
# Test that querying partition with unsupported plugin fails gracefully.
select count(*)
from multi_text_compression where month <= 3
---- CATCH
Scanner plugin 'LZ4' is not one of the enabled plugins: 'LZO'
====
---- QUERY
# Unknown compression suffix is treated as uncompressed text.
select id
from multi_text_compression where month = 4
---- RESULTS
---- TYPES
INT
---- ERRORS
Error converting column: 0 to INT
Error parsing row: file: __HDFS_FILENAME__, before offset: 16
====