PageRenderTime 14ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
text | 21 lines | 16 code | 5 blank | 0 comment | 0 complexity | cd57945e7bfa944fb4a0f50394f481ae MD5 | raw file
 1EXPLAIN
 2CREATE TEMPORARY FUNCTION test_translate AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate';
 3
 4CREATE TEMPORARY FUNCTION test_translate AS 'org.apache.hadoop.hive.ql.udf.generic.GenericUDFTestTranslate';
 5
 6CREATE TABLE dest1(c1 STRING, c2 STRING, c3 STRING, c4 STRING, c5 STRING, c6 STRING, c7 STRING);
 7
 8FROM src 
 9INSERT OVERWRITE TABLE dest1 
10SELECT 
11    test_translate('abc', 'a', 'b'),
12    test_translate('abc', 'ab', 'bc'),
13    test_translate(NULL, 'a', 'b'),
14    test_translate('a', NULL, 'b'),
15    test_translate('a', 'a', NULL),
16    test_translate('abc', 'ab', 'b'),
17    test_translate('abc', 'a', 'ab');
18
19SELECT dest1.* FROM dest1 LIMIT 1;
20
21DROP TEMPORARY FUNCTION test_translate;