PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/tags/release-0.2.0-rc0/hive/external/contrib/src/test/queries/clientpositive/udaf_example_avg.q

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