PageRenderTime 26ms CodeModel.GetById 23ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/test/queries/clientpositive/udf_concat_ws.q

#
text | 18 lines | 13 code | 5 blank | 0 comment | 0 complexity | 4b64782d61da2f4464e3e41811bb70bf MD5 | raw file
 1DESCRIBE FUNCTION concat_ws;
 2DESCRIBE FUNCTION EXTENDED concat_ws;
 3
 4CREATE TABLE dest1(c1 STRING, c2 STRING, c3 STRING);
 5
 6FROM src INSERT OVERWRITE TABLE dest1 SELECT 'abc', 'xyz', '8675309'  WHERE src.key = 86;
 7
 8EXPLAIN
 9SELECT concat_ws(dest1.c1, dest1.c2, dest1.c3),
10       concat_ws(',', dest1.c1, dest1.c2, dest1.c3),
11       concat_ws(NULL, dest1.c1, dest1.c2, dest1.c3),
12       concat_ws('**', dest1.c1, NULL, dest1.c3) FROM dest1;
13
14SELECT concat_ws(dest1.c1, dest1.c2, dest1.c3),
15       concat_ws(',', dest1.c1, dest1.c2, dest1.c3),
16       concat_ws(NULL, dest1.c1, dest1.c2, dest1.c3),
17       concat_ws('**', dest1.c1, NULL, dest1.c3) FROM dest1;
18