[
https://issues.apache.org/jira/browse/HIVE-9857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14356122#comment-14356122
]
Alexander Pivovarov commented on HIVE-9857:
-------------------------------------------
This UDF uses one of the common-math3 class.
I checked all jars in hive/lib folder. common-math3 packages are found in
hive/lib/hive-jdbc-1.2.0-SNAPSHOT-standalone.jar only.
There is a JIRA HIVE-9599 to remove all irrelevant for jdbc driver classes from
hive-jdbc-standalone.
HIVE-9599.2.patch excludes common-math3 from standalone jar
Probably we should explicitly add common-math3 dependency to hive.
Currently hive-exec has transitive compile time dependency to
common-math3-3.1.1 from spark-core
I'm not sure what common-math3 version should I add to hive pom.xml. The latest
3.4.1 or 3.1.1 to avoid potential conflicts with spark-core.
> Create Factorial UDF
> --------------------
>
> Key: HIVE-9857
> URL: https://issues.apache.org/jira/browse/HIVE-9857
> Project: Hive
> Issue Type: Improvement
> Components: UDF
> Reporter: Alexander Pivovarov
> Assignee: Alexander Pivovarov
> Attachments: HIVE-9857.1.patch, HIVE-9857.2.patch
>
>
> Function signature: factorial(int a): bigint
> For example 5!= 5*4*3*2*1=120
> {code}
> select factorial(5);
> OK
> 120
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)