mirror of
https://github.com/apache/impala.git
synced 2026-01-10 00:00:16 -05:00
IMPALA-9482 added support to the remaining Hive types and removed the functional.unsupported_types table. There was a reference remaining in a misc test. test_misc is not marked as exhaustive but it only runs in exhaustive builds. Change-Id: I65b6ea5ac742fbcc427ad41741d347558cb7d110 Reviewed-on: http://gerrit.cloudera.org:8080/18896 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
135 lines
2.1 KiB
Plaintext
135 lines
2.1 KiB
Plaintext
====
|
|
---- QUERY
|
|
# Test to select from table with additional columns at the end that are not in the
|
|
# schema and with missing columns
|
|
select * from tblwithraggedcolumns
|
|
---- RESULTS
|
|
'hello',1
|
|
'\\r\\r\\n',NULL
|
|
'',NULL
|
|
'foo',2
|
|
'a',3
|
|
'',NULL
|
|
'b',4
|
|
'c',NULL
|
|
'd',NULL
|
|
'ColumnWithCarriageReturn',123
|
|
'at16bytes',NULL
|
|
'NoDelimiter',0
|
|
---- TYPES
|
|
string, int
|
|
====
|
|
---- QUERY
|
|
select int_col from tblwithraggedcolumns
|
|
---- RESULTS
|
|
0
|
|
1
|
|
123
|
|
2
|
|
3
|
|
4
|
|
NULL
|
|
NULL
|
|
NULL
|
|
NULL
|
|
NULL
|
|
NULL
|
|
---- TYPES
|
|
int
|
|
====
|
|
---- QUERY
|
|
select str_col from tblwithraggedcolumns
|
|
---- RESULTS
|
|
'hello'
|
|
'\\r\\r\\n'
|
|
''
|
|
'foo'
|
|
'a'
|
|
''
|
|
'b'
|
|
'c'
|
|
'd'
|
|
'ColumnWithCarriageReturn'
|
|
'at16bytes'
|
|
'NoDelimiter'
|
|
---- TYPES
|
|
string
|
|
====
|
|
---- QUERY
|
|
# Quoting test
|
|
SELECT `table_alias`.`int_col` AS `default_int_col`
|
|
FROM `functional`.`alltypes` `table_alias`
|
|
GROUP BY `default_int_col`
|
|
LIMIT 10
|
|
---- RESULTS
|
|
0
|
|
7
|
|
3
|
|
9
|
|
4
|
|
6
|
|
1
|
|
5
|
|
2
|
|
8
|
|
---- TYPES
|
|
int
|
|
====
|
|
---- QUERY
|
|
# Test string-literal escape sequences
|
|
SELECT ASCII("\0"), ASCII("\\"), ASCII("\b"), ASCII("\n"), ASCII("\r"), ASCII("\t"), ASCII("\Z")
|
|
---- RESULTS
|
|
0,92,8,10,13,9,26
|
|
---- TYPES
|
|
int, int, int, int, int, int, int
|
|
====
|
|
---- QUERY
|
|
# Test escaping non-escape chars. We expect the escape to be simply removed.
|
|
SELECT ASCII("\a"), ASCII("\X"), ASCII("\z"), ASCII("\?"), ASCII("\*")
|
|
---- RESULTS
|
|
97,88,122,63,42
|
|
---- TYPES
|
|
int, int, int, int, int
|
|
====
|
|
---- QUERY
|
|
# Test escaping '%' and '_' which handled specially.
|
|
# We expect '\\%' and '\%' to result in '\%' (similarly for '_')
|
|
SELECT "\%", "\\%", "\_", "\\_"
|
|
---- RESULTS
|
|
'\\%','\\%','\\_','\\_'
|
|
---- TYPES
|
|
string, string, string, string
|
|
====
|
|
---- QUERY
|
|
# Test query filed in IMPALA-65
|
|
SELECT "quote \"", 'quote \''
|
|
---- RESULTS
|
|
'quote "','quote '''
|
|
---- TYPES
|
|
string, string
|
|
====
|
|
---- QUERY
|
|
# IMPALA-9641: Empty double quotation should not cause infinite loop in the
|
|
# ImpalaD Frontend
|
|
SELECT 1 as "``"
|
|
---- RESULTS
|
|
1
|
|
---- TYPES
|
|
tinyint
|
|
====
|
|
---- QUERY
|
|
# where clause is a SlotRef
|
|
SELECT count(*) from alltypes where bool_col
|
|
---- RESULTS
|
|
3650
|
|
---- TYPES
|
|
bigint
|
|
====
|
|
---- QUERY
|
|
# having clause is a SlotRef
|
|
SELECT count(*) from alltypes group by bool_col having bool_col
|
|
---- RESULTS
|
|
3650
|
|
---- TYPES
|
|
bigint
|
|
==== |