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 04FB417438 for ; Sat, 27 Jun 2015 13:22:05 +0000 (UTC) Received: (qmail 58144 invoked by uid 500); 27 Jun 2015 13:22:04 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 58117 invoked by uid 500); 27 Jun 2015 13:22:04 -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 58107 invoked by uid 99); 27 Jun 2015 13:22:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Jun 2015 13:22:04 +0000 Date: Sat, 27 Jun 2015 13:22:04 +0000 (UTC) From: "Jinfeng Ni (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-3411) CTAS Partition by column in deeper layer fails 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-3411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14604150#comment-14604150 ] Jinfeng Ni commented on DRILL-3411: ----------------------------------- It does not have to have alias. The original query should work in the current master branch (a patch was merged yesterday). {code} create table t1 (c1, c2) partition by (c2) as . . . . . . . . . . . > select t.id, t.batters.batter from `t.json` t; +-----------+----------------------------+ | Fragment | Number of records written | +-----------+----------------------------+ | 0_0 | 2 | +-----------+----------------------------+ {code} > CTAS Partition by column in deeper layer fails > ---------------------------------------------- > > Key: DRILL-3411 > URL: https://issues.apache.org/jira/browse/DRILL-3411 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Reporter: Sean Hsuan-Yi Chu > Assignee: Jinfeng Ni > > A simple data such as > {code} > { > "id": "0001", > "type": "donut1", > "batters": > { > "batter": 1 > } > } > { > "id": "0002", > "type": "donut2", > "batters": > { > "batter": 2 > } > } > {code} > I tried to partition by batters.batter: > {code} > create table t1 (c1, c2) partition by (c2) as > select t.id, t.batters.batter from `t.json` t; > {code} > But got this exception: > Error: SYSTEM ERROR: IllegalArgumentException: partition col c2 could not be resolved in table's column lists! -- This message was sent by Atlassian JIRA (v6.3.4#6332)