/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
- add jar ${system:build.dir}/hive-contrib-${system:hive.version}.jar;
-
- CREATE TEMPORARY FUNCTION example_avg AS 'org.apache.hadoop.hive.contrib.udaf.example.UDAFExampleAvg';
-
- EXPLAIN
- SELECT example_avg(substr(value,5)),
- example_avg(IF(substr(value,5) > 250, NULL, substr(value,5)))
- FROM src;
-
- SELECT example_avg(substr(value,5)),
- example_avg(IF(substr(value,5) > 250, NULL, substr(value,5)))
- FROM src;
-
- DROP TEMPORARY FUNCTION example_avg;