Files
impala/testdata/workloads/functional-query/queries/QueryTest/strict-mode.test
Henry Robinson 34b5f1c416 IMPALA-(3895,3859): Don't log file data on parse errors
Logging file or table data is a bad idea, and doing it by default is
particularly bad. This patch changes HdfsScanNode::LogRowParseError() to
log a file and offset only.

Testing: See rewritten tests.

To support testing this change, we also fix IMPALA-3895, by introducing
a canonical string __HDFS_FILENAME__ that all Hadoop filenames in the ERROR
output are replaced with before comparing with the expected
results. This fixes a number of issues with the old way of matching
filenames which purported to be a regex, but really wasn't. In
particular, we can now match the rest of an ERROR line after the
filename, which was not possible before.

In some cases, we don't want to substitute filenames because the ERROR
output is looking for a very specific output. In that case we can write:

$NAMENODE/<filename>

and this patch will not perform _any_ filename substitutions on ERROR
sections that contain the $NAMENODE string.

Finally, this patch fixes a bug where a test that had an ERRORS section
but no RESULTS section would silently pass without testing anything.

Change-Id: I5a604f8784a9ff7b4bf878f82ee7f56697df3272
Reviewed-on: http://gerrit.cloudera.org:8080/4020
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: Internal Jenkins
2016-08-25 10:20:36 +00:00

26 lines
784 B
Plaintext

====
---- QUERY
select * from overflow
---- ERRORS
Error converting column: 0 to TINYINT
Error converting column: 1 to SMALLINT
Error converting column: 2 to INT
Error converting column: 3 to BIGINT
Error converting column: 4 to FLOAT
Error converting column: 5 to DOUBLE
row_regex: .*Error parsing row: file: $NAMENODE/.* before offset: \d+
Error converting column: 0 to TINYINT
Error converting column: 1 to SMALLINT
Error converting column: 2 to INT
Error converting column: 3 to BIGINT
Error converting column: 4 to FLOAT
Error converting column: 5 to DOUBLE
row_regex: .*Error parsing row: file: $NAMENODE/.* before offset: \d+
---- RESULTS
1,2,3,4,5.5,6.6
NULL,NULL,NULL,NULL,NULL,NULL
NULL,NULL,NULL,NULL,NULL,NULL
---- TYPES
tinyint, smallint, int, bigint, float, double
====