IMPALA-2227: S3: query_test.test_queries.TestQueries.test_exprs failure

The test file testdata/workloads/functional-query/queries/QueryTest/exprs.test had INSERT
statements in it, which are not supported on S3. This commit gets rid of those statements
and rewrites them with SELECT [...] FROM VALUES(...) so that the tests are compatible on
S3.

Change-Id: I25faacf9fae3780f627afee86dc8c1ede7f6e2a2
Reviewed-on: http://gerrit.cloudera.org:8080/670
Reviewed-by: Sailesh Mukil <sailesh@cloudera.com>
Tested-by: Internal Jenkins
This commit is contained in:
Sailesh Mukil
2015-08-21 12:22:53 -07:00
committed by Internal Jenkins
parent 452ebee59d
commit 1a9fc47295

View File

@@ -2068,49 +2068,21 @@ where REGEXP_LIKE(upper(str_col), lower(match_regex_col), 'c')
string, string
====
---- QUERY
drop table if exists multiline_test_table
select tmp.str from (values
('testfield' as str),
('multi\nfield'),
('multi\nfield\ntwo')) as tmp
where regexp_like(tmp.str, '^multi.*$')
---- RESULTS
====
---- QUERY
create table multiline_test_table(id_col INT, str_col STRING)
row format delimited lines terminated by ','
---- RESULTS
====
---- QUERY
insert into multiline_test_table values(1, 'testfield')
====
---- QUERY
insert into multiline_test_table values(1, 'multi\nfield')
====
---- QUERY
insert into multiline_test_table values(1, 'multi\nfield\ntwo')
====
---- QUERY
select str_col from multiline_test_table
where REGEXP_LIKE(str_col, "^multi.*$")
---- RESULTS
---- TYPES
----TYPES
string
====
---- QUERY
select translate(str_col, '\n', '@') from multiline_test_table
where REGEXP_LIKE(str_col, "^multi.*$", 'n')
---- RESULTS
'multi@field@two'
'multi@field'
---- TYPES
string
====
---- QUERY
select str_col from multiline_test_table
where REGEXP_LIKE(str_col, "^fiel.*$", 'n')
---- RESULTS
---- TYPES
string
====
---- QUERY
select translate(str_col, '\n', '@') from multiline_test_table
where REGEXP_LIKE(str_col, "^fiel.*$", 'm')
select translate(tmp.str, '\n', '@') from (values
('testfield' as str),
('multi\nfield'),
('multi\nfield\ntwo')) as tmp
where regexp_like(tmp.str, '^multi.*$', 'n')
---- RESULTS
'multi@field'
'multi@field@two'
@@ -2118,8 +2090,21 @@ where REGEXP_LIKE(str_col, "^fiel.*$", 'm')
string
====
---- QUERY
select translate(str_col, '\n', '@') from multiline_test_table
where REGEXP_LIKE(str_col, "^fiel.*$", 'mn')
select translate(tmp.str, '\n', '@') from (values
('testfield' as str),
('multi\nfield'),
('multi\nfield\ntwo')) as tmp
where regexp_like(tmp.str, '^fiel.*$', 'n')
---- RESULTS
---- TYPES
string
====
---- QUERY
select translate(tmp.str, '\n', '@') from (values
('testfield' as str),
('multi\nfield'),
('multi\nfield\ntwo')) as tmp
where regexp_like(tmp.str, '^fiel.*$', 'm')
---- RESULTS
'multi@field'
'multi@field@two'
@@ -2127,8 +2112,23 @@ where REGEXP_LIKE(str_col, "^fiel.*$", 'mn')
string
====
---- QUERY
select translate(str_col, '\n', '@') from multiline_test_table
where REGEXP_LIKE('', '', '')
select translate(tmp.str, '\n', '@') from (values
('testfield' as str),
('multi\nfield'),
('multi\nfield\ntwo')) as tmp
where regexp_like(tmp.str, '^fiel.*$', 'mn')
---- RESULTS
'multi@field'
'multi@field@two'
---- TYPES
string
====
---- QUERY
select translate(tmp.str, '\n', '@') from (values
('testfield' as str),
('multi\nfield'),
('multi\nfield\ntwo')) as tmp
where regexp_like('', '', '')
---- RESULTS
'testfield'
'multi@field'
@@ -2137,8 +2137,11 @@ where REGEXP_LIKE('', '', '')
string
====
---- QUERY
select translate(str_col, '\n', '@') from multiline_test_table
where REGEXP_LIKE('', '')
select translate(tmp.str, '\n', '@') from (values
('testfield' as str),
('multi\nfield'),
('multi\nfield\ntwo')) as tmp
where regexp_like('', '')
---- RESULTS
'testfield'
'multi@field'
@@ -2175,6 +2178,3 @@ select split_part(tmp.str, tmp.delim, pos) from (values
---- TYPES
string
====
---- QUERY
drop table if exists multiline_test_table
====