Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-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 26C0611E70 for ; Mon, 9 Jun 2014 07:17:29 +0000 (UTC) Received: (qmail 24461 invoked by uid 500); 9 Jun 2014 07:17:29 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 24438 invoked by uid 500); 9 Jun 2014 07:17:29 -0000 Mailing-List: contact issues-help@drill.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.incubator.apache.org Delivered-To: mailing list issues@drill.incubator.apache.org Received: (qmail 24429 invoked by uid 99); 9 Jun 2014 07:17:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jun 2014 07:17:29 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,LOTS_OF_MONEY,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 09 Jun 2014 07:17:28 +0000 Received: (qmail 21882 invoked by uid 99); 9 Jun 2014 07:17:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jun 2014 07:17:07 +0000 Date: Mon, 9 Jun 2014 07:17:07 +0000 (UTC) From: "Jacques Nadeau (JIRA)" To: issues@drill.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-910) to_number returns a float when when integer is expected. 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/DRILL-910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Nadeau updated DRILL-910: --------------------------------- Assignee: Mehant Baid > to_number returns a float when when integer is expected. > -------------------------------------------------------- > > Key: DRILL-910 > URL: https://issues.apache.org/jira/browse/DRILL-910 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill > Reporter: Krystal > Assignee: Mehant Baid > > git.commit.id.abbrev=8490d74 > git.build.time=02.06.2014 @ 10\:11\:56 PDT > 0: jdbc:drill:schema=dfs> select to_number('$987,966', '$###,###') from voter where voter_id=10; > +------------+ > | EXPR$0 | > +------------+ > | 987966.0 | > +------------+ > 0: jdbc:drill:schema=dfs> select to_number('2,900.55', '#,###') from voter where voter_id=10; > +------------+ > | EXPR$0 | > +------------+ > | 2901.0 | > +------------+ > In the first example, an int is passed to_number so we expect an in to return. In the second example, the format in the second argument is to return an int. > In both cases, postgres and oracle return an int. -- This message was sent by Atlassian JIRA (v6.2#6252)