Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 04249200CA6 for ; Tue, 30 May 2017 02:33:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 031C1160BDF; Tue, 30 May 2017 00:33:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 51F98160BD6 for ; Tue, 30 May 2017 02:33:07 +0200 (CEST) Received: (qmail 34589 invoked by uid 500); 30 May 2017 00:33:06 -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 34580 invoked by uid 99); 30 May 2017 00:33:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 May 2017 00:33:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 318F7C0C14 for ; Tue, 30 May 2017 00:33:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id IFEIP6FYg3cd for ; Tue, 30 May 2017 00:33:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 01E135FD3E for ; Tue, 30 May 2017 00:33:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7A6D4E0A75 for ; Tue, 30 May 2017 00:33:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 2813F21B58 for ; Tue, 30 May 2017 00:33:04 +0000 (UTC) Date: Tue, 30 May 2017 00:33:04 +0000 (UTC) From: "Aman Sinha (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DRILL-5556) Drill allows "SELECT *, *" query MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 30 May 2017 00:33:08 -0000 [ https://issues.apache.org/jira/browse/DRILL-5556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16028682#comment-16028682 ] Aman Sinha commented on DRILL-5556: ----------------------------------- I am not sure if it is an invalid SQL. Postgres certainly allows it: {noformat} tpcds=# select * from tt1 ; a1 | b1 ----+---- 10 | 20 (1 row) tpcds=# select *, * from tt1 ; a1 | b1 | a1 | b1 ----+----+----+---- 10 | 20 | 10 | 20 (1 row) {noformat} Only when you reference the columns in some way, e.g from an outer query block then it will given an error: {noformat} tpcds=# select a1 from (select *, * from tt1) as d; ERROR: column reference "a1" is ambiguous LINE 1: select a1 from (select *, * from tt1) as d; {noformat} > Drill allows "SELECT *, *" query > -------------------------------- > > Key: DRILL-5556 > URL: https://issues.apache.org/jira/browse/DRILL-5556 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.10.0 > Reporter: Paul Rogers > Priority: Minor > > Configure the CSV storage plugin to not read the header row. Create a simple CSV file: > {code} > 10,foo,bar > {code} > Issue the following nonsensical query: > {code} > SELECT *, * FROM `dfs.data`.`example.csv` > {code} > Get the following results: > {code} > columns,columns0 > ["10","foo","bar"],["10","foo","bar"] > {code} > Expected an error as using two unqualified *'s is not valid SQL. -- This message was sent by Atlassian JIRA (v6.3.15#6346)