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 178181076F for ; Thu, 15 Jan 2015 00:19:34 +0000 (UTC) Received: (qmail 86812 invoked by uid 500); 15 Jan 2015 00:19:35 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 86771 invoked by uid 500); 15 Jan 2015 00:19: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 86761 invoked by uid 99); 15 Jan 2015 00:19:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2015 00:19:35 +0000 Date: Thu, 15 Jan 2015 00:19:35 +0000 (UTC) From: "Jason Altekruse (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-2011) View on top of a aggregation over a subquery fails to plan 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-2011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Altekruse updated DRILL-2011: ----------------------------------- Affects Version/s: 0.7.0 > View on top of a aggregation over a subquery fails to plan > ---------------------------------------------------------- > > Key: DRILL-2011 > URL: https://issues.apache.org/jira/browse/DRILL-2011 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 0.7.0 > Reporter: Jason Altekruse > > This last query in this test will currently fail to plan, the exception is - SEVERE: org.eigenbase.util.EigenbaseContextException: At line 0, column 0: Table 'EXPR$0' not found > The anonymous sub-query in the view is not able to be resolved inside of calcite, simply giving an alias to the subquery fixes the planning issue. The query runs fine if not defined in a view. > @Test > public void testAggOnSubquery() throws Exception { > test("use dfs.tmp"); > test("create or replace view testAggOnSubquery_view as select n_nationkey, sum(n_regionkey) from (select n_nationkey,n_regionkey from cp.`tpch/nation.parquet`) GROUP BY n_nationkey"); > test("select n_nationkey from testAggOnSubquery_view"); > } > This runs fine: > select n_nationkey from (select n_nationkey, sum(n_regionkey) from (select n_nationkey,n_regionkey from cp.`tpch/nation.parquet`) GROUP BY n_nationkey) -- This message was sent by Atlassian JIRA (v6.3.4#6332)