Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 52B6510A64 for ; Mon, 16 Mar 2015 18:01:39 +0000 (UTC) Received: (qmail 9842 invoked by uid 500); 16 Mar 2015 18:01:39 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 9576 invoked by uid 500); 16 Mar 2015 18:01:39 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 9554 invoked by uid 99); 16 Mar 2015 18:01:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Mar 2015 18:01:38 +0000 Date: Mon, 16 Mar 2015 18:01:38 +0000 (UTC) From: "Alexander Pivovarov (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-9858) Create cbrt (cube root) UDF MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-9858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14363611#comment-14363611 ] Alexander Pivovarov commented on HIVE-9858: ------------------------------------------- The function description was added to hive wiki. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-MathematicalFunctions > Create cbrt (cube root) UDF > --------------------------- > > Key: HIVE-9858 > URL: https://issues.apache.org/jira/browse/HIVE-9858 > Project: Hive > Issue Type: Improvement > Components: UDF > Reporter: Alexander Pivovarov > Assignee: Alexander Pivovarov > Fix For: 1.2.0 > > Attachments: HIVE-9858.1.patch, HIVE-9858.1.patch, HIVE-9858.2.patch > > > returns the cube root of a double value > cbrt(double a) : double > For example: > {code} > select cbrt(87860583272930481.0); > OK > 444561.0 > {code} > I noticed that Math.pow(a, 1.0/3.0) and hive power UDF return 444560.99999999965 for the example above. > However Math.cbrt returns 444561.0 > This is why we should have hive cbrt function in hive -- This message was sent by Atlassian JIRA (v6.3.4#6332)