Files
impala/testdata/workloads/functional-query/queries/QueryTest/chars.test
Victor Bittorf 2dce31f6c2 Adding VARCHAR front & backend.
VARCHAR is treated as StringVal in the backend. All UDAs and UDFs which accept STRING
will also accept VARCHAR(N).

TODO: Reverted Avro codegen to fix Jenkins; needs separate patch.

Change-Id: Ifc120b6f0fe1f996b11a48b134d339ad3719331e
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/2527
Reviewed-by: Victor Bittorf <victor.bittorf@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 3fcbf4f677b8e26c37eded4d8bb628e6fc53c1e9)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4058
2014-08-27 13:52:58 -07:00

37 lines
662 B
Plaintext

====
---- QUERY
drop table if exists test_varchar_tmp
====
---- QUERY
create table if not exists test_varchar_tmp (vc varchar(5))
====
---- QUERY
insert into test_varchar_tmp values (cast("hello" as varchar(5)))
====
---- QUERY
select * from test_varchar_tmp
---- TYPES
string
---- RESULTS
'hello'
====
---- QUERY
insert into test_varchar_tmp values (cast("xyzzzzz12" as varchar(7)))
---- CATCH
would need to be cast to VARCHAR(5)
====
---- QUERY
insert into test_varchar_tmp values (cast("hel" as varchar(4)))
====
---- QUERY
select * from test_varchar_tmp
---- TYPES
string
---- RESULTS
'hello'
'hel'
====
---- QUERY
drop table if exists test_varchar_tmp
====