mirror of
https://github.com/apache/impala.git
synced 2026-01-01 18:00:30 -05:00
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
161 lines
5.6 KiB
Plaintext
161 lines
5.6 KiB
Plaintext
====
|
|
---- QUERY
|
|
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col,
|
|
double_col, date_string_col, string_col from alltypeserror
|
|
---- ERRORS
|
|
Error converting column: 3 to SMALLINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 4 to INT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 2 to TINYINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 4 to INT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 1 to BOOLEAN
|
|
Error converting column: 2 to TINYINT
|
|
Error converting column: 3 to SMALLINT
|
|
Error converting column: 4 to INT
|
|
Error converting column: 5 to BIGINT
|
|
Error converting column: 6 to FLOAT
|
|
Error converting column: 7 to DOUBLE
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 6 to FLOAT
|
|
Error converting column: 7 to DOUBLE
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 2 to TINYINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 7 to DOUBLE
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 1 to BOOLEAN
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 2 to TINYINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 3 to SMALLINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 4 to INT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 5 to BIGINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 6 to FLOAT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 7 to DOUBLE
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 1 to BOOLEAN
|
|
Error converting column: 2 to TINYINT
|
|
Error converting column: 3 to SMALLINT
|
|
Error converting column: 4 to INT
|
|
Error converting column: 5 to BIGINT
|
|
Error converting column: 6 to FLOAT
|
|
Error converting column: 7 to DOUBLE
|
|
file: __HDFS_FILENAME__
|
|
---- RESULTS
|
|
0,NULL,NULL,0,0,0,0,0,'01/01/09','0'
|
|
1,NULL,NULL,1,1,10,1,10.1,'01/01/09','1'
|
|
10,NULL,NULL,NULL,0,0,0,0,'02/01/09','0'
|
|
11,false,NULL,NULL,NULL,10,1,10.1,'02/01/09','1'
|
|
12,true,2,NULL,NULL,NULL,2,20.2,'02/01/09','2'
|
|
13,false,3,3,NULL,NULL,NULL,NULL,'02/01/09','3'
|
|
14,true,4,4,4,40,NULL,NULL,'02/01/09','4'
|
|
15,false,NULL,5,5,50,5,50.5,'02/01/09','5'
|
|
16,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'02/01/09','6'
|
|
17,false,7,7,7,70,7,NULL,'02/01/09','7'
|
|
18,true,8,8,8,80,8,80.8,'02/01/09','8'
|
|
19,false,9,9,9,90,9,90.90000000000001,'02/01/09','9'
|
|
2,true,NULL,NULL,2,20,2,20.2,'01/01/09','2'
|
|
20,true,0,0,0,0,0,0,'03/01/09','0'
|
|
21,false,1,1,1,10,1,10.1,'03/01/09','1'
|
|
22,true,2,2,2,20,2,20.2,'03/01/09','2'
|
|
23,false,3,NULL,3,30,3,30.3,'03/01/09','3'
|
|
24,true,4,4,4,40,4,40.4,'03/01/09','4'
|
|
25,false,5,5,NULL,50,5,50.5,'03/01/09','5'
|
|
26,true,6,6,6,60,6,60.6,'03/01/09','6'
|
|
27,false,NULL,7,7,70,7,70.7,'03/01/09','7'
|
|
28,true,8,8,8,80,8,80.8,'03/01/09','8'
|
|
29,false,9,9,NULL,90,9,90.90000000000001,'03/01/09','9'
|
|
3,false,3,NULL,NULL,30,3,30.3,'01/01/09','3'
|
|
30,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'01/01/10','10'
|
|
4,true,4,4,NULL,NULL,4,40.4,'01/01/09','4'
|
|
5,false,5,5,5,NULL,NULL,50.5,'01/01/09','5'
|
|
6,true,6,6,6,60,NULL,NULL,'01/01/09','6'
|
|
7,NULL,NULL,7,7,70,7,NULL,'01/01/09','7'
|
|
8,false,NULL,NULL,8,80,8,80.8,'01/01/09','8'
|
|
9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'01/01/09','9'
|
|
---- TYPES
|
|
INT,BOOLEAN,TINYINT,SMALLINT,INT,BIGINT,FLOAT,DOUBLE,STRING,STRING
|
|
====
|
|
---- QUERY
|
|
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col,
|
|
double_col, date_string_col, string_col from alltypeserrornonulls
|
|
---- RESULTS
|
|
0,true,0,0,0,0,0,0,'01/01/09','0'
|
|
1,NULL,1,1,1,10,1,10.1,'01/01/09','1'
|
|
10,true,0,0,0,0,0,0,'02/01/09','0'
|
|
11,false,1,1,1,10,1,10.1,'02/01/09','1'
|
|
12,true,2,2,2,20,2,20.2,'02/01/09','2'
|
|
13,false,3,3,3,30,NULL,NULL,'02/01/09','3'
|
|
14,true,4,4,4,40,4,40.4,'02/01/09','4'
|
|
15,false,NULL,5,5,50,5,50.5,'02/01/09','5'
|
|
16,true,6,6,6,60,6,60.6,'02/01/09','6'
|
|
17,false,7,7,7,70,7,NULL,'02/01/09','7'
|
|
18,true,8,8,8,80,8,80.8,'02/01/09','8'
|
|
19,false,9,9,9,90,9,90.90000000000001,'02/01/09','9'
|
|
2,true,NULL,2,2,20,2,20.2,'01/01/09','2'
|
|
20,true,0,0,0,0,0,0,'03/01/09','0'
|
|
21,false,1,1,1,10,1,10.1,'03/01/09','1'
|
|
22,true,2,2,2,20,2,20.2,'03/01/09','2'
|
|
23,false,3,NULL,3,30,3,30.3,'03/01/09','3'
|
|
24,true,4,4,4,40,4,40.4,'03/01/09','4'
|
|
25,false,5,5,NULL,50,5,50.5,'03/01/09','5'
|
|
26,true,6,6,6,60,6,60.6,'03/01/09','6'
|
|
27,false,NULL,7,7,70,7,70.7,'03/01/09','7'
|
|
28,true,8,8,8,80,8,80.8,'03/01/09','8'
|
|
29,false,9,9,NULL,90,9,90.90000000000001,'03/01/09','9'
|
|
3,false,3,NULL,3,30,3,30.3,'01/01/09','3'
|
|
4,true,4,4,NULL,40,4,40.4,'01/01/09','4'
|
|
5,false,5,5,5,NULL,5,50.5,'01/01/09','5'
|
|
6,true,6,6,6,60,NULL,60.6,'01/01/09','6'
|
|
7,false,7,7,7,70,7,NULL,'01/01/09','7'
|
|
8,false,8,8,8,80,8,80.8,'01/01/09','8'
|
|
9,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'01/01/09','9'
|
|
---- TYPES
|
|
INT,BOOLEAN,TINYINT,SMALLINT,INT,BIGINT,FLOAT,DOUBLE,STRING,STRING
|
|
---- ERRORS
|
|
Error converting column: 3 to SMALLINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 4 to INT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 2 to TINYINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 4 to INT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 6 to FLOAT
|
|
Error converting column: 7 to DOUBLE
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 2 to TINYINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 7 to DOUBLE
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 1 to BOOLEAN
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 2 to TINYINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 3 to SMALLINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 4 to INT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 5 to BIGINT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 6 to FLOAT
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 7 to DOUBLE
|
|
file: __HDFS_FILENAME__
|
|
Error converting column: 1 to BOOLEAN
|
|
Error converting column: 2 to TINYINT
|
|
Error converting column: 3 to SMALLINT
|
|
Error converting column: 4 to INT
|
|
Error converting column: 5 to BIGINT
|
|
Error converting column: 6 to FLOAT
|
|
Error converting column: 7 to DOUBLE
|
|
file: __HDFS_FILENAME__
|
|
====
|