Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A0B4DCEC5 for ; Fri, 19 Jul 2013 19:34:52 +0000 (UTC) Received: (qmail 31202 invoked by uid 500); 19 Jul 2013 19:34:51 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 31118 invoked by uid 500); 19 Jul 2013 19:34:51 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 31018 invoked by uid 500); 19 Jul 2013 19:34:51 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 31015 invoked by uid 99); 19 Jul 2013 19:34:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Jul 2013 19:34:51 +0000 Date: Fri, 19 Jul 2013 19:34:51 +0000 (UTC) From: "Eric Hanson (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-4822) implement vectorized math functions 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-4822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13713993#comment-13713993 ] Eric Hanson commented on HIVE-4822: ----------------------------------- Also, pmod() is not included in this patch, because it is already implemented as the existing VectorExpression classes for Modulo (%). > implement vectorized math functions > ----------------------------------- > > Key: HIVE-4822 > URL: https://issues.apache.org/jira/browse/HIVE-4822 > Project: Hive > Issue Type: Sub-task > Affects Versions: vectorization-branch > Reporter: Eric Hanson > Assignee: Eric Hanson > Fix For: vectorization-branch > > Attachments: HIVE-4822.1.patch, HIVE-4822.4.patch > > > Implement vectorized support for the all the built-in math functions. This includes implementing the vectorized operation, and tying it all together in VectorizationContext so it runs end-to-end. These functions include: > round(Col) > Round(Col, N) > Floor(Col) > Ceil(Col) > Rand(), Rand(seed) > Exp(Col) > Ln(Col) > Log10(Col) > Log2(Col) > Log(base, Col) > Pow(col, p), Power(col, p) > Sqrt(Col) > Bin(Col) > Hex(Col) > Unhex(Col) > Conv(Col, from_base, to_base) > Abs(Col) > Pmod(arg1, arg2) > Sin(Col) > Asin(Col) > Cos(Col) > ACos(Col) > Atan(Col) > Degrees(Col) > Radians(Col) > Positive(Col) > Negative(Col) > Sign(Col) > E() > Pi() > To reduce the total code volume, do an implicit type cast from non-double input types to double. > Also, POSITITVE and NEGATIVE are syntactic sugar for unary + and unary -, so reuse code for those as appropriate. > Try to call the function directly in the inner loop and avoid new() or expensive operations, as appropriate. > Templatize the code where appropriate, e.g. all the unary function of form > DOUBLE func(DOUBLE) > can probably be done with a template. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira