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

/tags/release-0.0.0-rc0/hive/external/contrib/src/test/queries/clientpositive/udaf_example_max_n.q

#
text | 14 lines | 10 code | 4 blank | 0 comment | 0 complexity | 16cf33d5ee8c1d47553dc0437a026821 MD5 | raw file
 1add jar ${system:build.dir}/hive-contrib-${system:hive.version}.jar;
 2
 3CREATE TEMPORARY FUNCTION example_max_n AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleMaxN';
 4
 5EXPLAIN
 6SELECT example_max_n(substr(value,5),10),
 7       example_max_n(IF(substr(value,5) > 250, NULL, substr(value,5)),10)
 8FROM src;
 9
10SELECT example_max_n(substr(value,5),10),
11       example_max_n(IF(substr(value,5) > 250, NULL, substr(value,5)),10)
12FROM src;
13
14DROP TEMPORARY FUNCTION example_max_n;