Return-Path: Delivered-To: apmail-hadoop-hive-dev-archive@minotaur.apache.org Received: (qmail 28157 invoked from network); 15 Mar 2009 04:55:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Mar 2009 04:55:11 -0000 Received: (qmail 25268 invoked by uid 500); 15 Mar 2009 04:55:11 -0000 Delivered-To: apmail-hadoop-hive-dev-archive@hadoop.apache.org Received: (qmail 25253 invoked by uid 500); 15 Mar 2009 04:55:11 -0000 Mailing-List: contact hive-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hadoop.apache.org Delivered-To: mailing list hive-dev@hadoop.apache.org Received: (qmail 25242 invoked by uid 99); 15 Mar 2009 04:55:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Mar 2009 21:55:11 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Mar 2009 04:55:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 92FC5234C041 for ; Sat, 14 Mar 2009 21:54:50 -0700 (PDT) Message-ID: <991655869.1237092890589.JavaMail.jira@brutus> Date: Sat, 14 Mar 2009 21:54:50 -0700 (PDT) From: "Raghotham Murthy (JIRA)" To: hive-dev@hadoop.apache.org Subject: [jira] Updated: (HIVE-253) rand() gets precomputated in compilation phase In-Reply-To: <1393122716.1233103979828.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HIVE-253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Raghotham Murthy updated HIVE-253: ---------------------------------- Status: Patch Available (was: Open) > rand() gets precomputated in compilation phase > ---------------------------------------------- > > Key: HIVE-253 > URL: https://issues.apache.org/jira/browse/HIVE-253 > Project: Hadoop Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.2.0 > Reporter: Zheng Shao > Assignee: Raghotham Murthy > Priority: Blocker > Fix For: 0.2.0 > > Attachments: hive-253.1.patch > > > SELECT * FROM t WHERE rand() < 0.01; > Hive will say: "No need to submit job", because the condition evaluates to false. > The rand() function is special in the sense that every time it evaluates to a different value. We should disallow computing the value in the compiling phase. > One way to do that is to add an annotation in the UDFRand and check that in the compiling phase. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.