Files
impala/testdata/workloads/functional-query/queries/QueryTest/misc.test
2014-01-08 10:45:11 -08:00

71 lines
1.3 KiB
Plaintext

# Test for selecting from table with null and empty strings.
select * from nulltable$TABLE
---- TYPES
string, string, string, int, double
---- RESULTS
'a','','NULL',NULL,NULL
====
select count(*),count(a),count(b),count(c),count(d),count(e) from nulltable$TABLE
---- TYPES
bigint, bigint, bigint, bigint, bigint, bigint
---- RESULTS
1,1,1,0,0,0
====
# Test for selecting from table with '\' escape character with null and empty strings.
select * from nullescapedtable$TABLE
---- TYPES
string, string, string, int, double
---- RESULTS
'a','','NULL',NULL,NULL
====
select count(*),count(a),count(b),count(c), count(d), count(e) from nullescapedtable$TABLE
---- TYPES
bigint, bigint, bigint, bigint, bigint, bigint
---- RESULTS
1,1,1,0,0,0
====
# Test to select from table with additional columns at the end that are not in the
# schema and with missing columns
select * from tblwithraggedcolumns$TABLE
---- TYPES
string, int
---- RESULTS
'',NULL
'MissingRowDelimiter',0
'a',3
'b',4
'c',NULL
'd',NULL
'foo',2
'hello',1
'x',NULL
====
select int_col from tblwithraggedcolumns$TABLE
---- TYPES
int
---- RESULTS
NULL
0
3
4
NULL
NULL
2
1
NULL
====
select str_col from tblwithraggedcolumns$TABLE
---- TYPES
string
---- RESULTS
''
'MissingRowDelimiter'
'a'
'b'
'c'
'd'
'foo'
'hello'
'x'
====