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