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 E7062102B5 for ; Thu, 29 Jan 2015 00:18:35 +0000 (UTC) Received: (qmail 61407 invoked by uid 500); 29 Jan 2015 00:18:35 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 61376 invoked by uid 500); 29 Jan 2015 00:18:35 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 61366 invoked by uid 99); 29 Jan 2015 00:18:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Jan 2015 00:18:35 +0000 Date: Thu, 29 Jan 2015 00:18:34 +0000 (UTC) From: "Abhishek Girish (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-2103) Queries with aggregate function on columns containing null values fail 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/DRILL-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296124#comment-14296124 ] Abhishek Girish commented on DRILL-2103: ---------------------------------------- Dataset: TPCDS (SF 1) Format: Views (with corresponding cast statements) on Text data. Sample view statement attached. > Queries with aggregate function on columns containing null values fail > ---------------------------------------------------------------------- > > Key: DRILL-2103 > URL: https://issues.apache.org/jira/browse/DRILL-2103 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Data Types > Reporter: Abhishek Girish > Assignee: Daniel Barclay (Drill/MapR) > Attachments: Create_views_store_sales.txt, agg_nulls.log > > > > describe store_sales; > ... > | ss_item_sk | INTEGER | NO | > ... > | ss_sales_price | DOUBLE | NO | > ... > > select count(*) from store_sales where ss_sales_price is NULL; > 129666 > > select count(*) from store_sales where ss_sales_price is NOT NULL; > 2750738 > > select avg(ss_item_sk) from store_sales; > Query failed: Query failed: Unexpected exception during fragment initialization: Internal error: Error while applying rule DrillReduceAggregatesRule, args [rel#852769:AggregateRel.NONE.ANY([]).[](child=rel#852768:Subset#3.NONE.ANY([]).[],group={},EXPR$0=AVG($0))] > Error: exception while executing query: Failure while executing query. (state=,code=0) > > select avg(ss_sales_price) from store_sales; > Query failed: Query failed: Unexpected exception during fragment initialization: Internal error: Error while applying rule DrillReduceAggregatesRule, args [rel#851712:AggregateRel.NONE.ANY([]).[](child=rel#851711:Subset#3.NONE.ANY([]).[],group={},EXPR$0=AVG($0))] > Error: exception while executing query: Failure while executing query. (state=,code=0) > Log attached. -- This message was sent by Atlassian JIRA (v6.3.4#6332)