Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1A95711D13 for ; Tue, 24 Jun 2014 18:04:28 +0000 (UTC) Received: (qmail 38048 invoked by uid 500); 24 Jun 2014 18:04:27 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 37986 invoked by uid 500); 24 Jun 2014 18:04:27 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 37971 invoked by uid 500); 24 Jun 2014 18:04:27 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 37968 invoked by uid 99); 24 Jun 2014 18:04:27 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2014 18:04:27 +0000 Date: Tue, 24 Jun 2014 18:04:27 +0000 (UTC) From: "Xuefu Zhang (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-494) Select columns by index instead of name 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/HIVE-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14042453#comment-14042453 ] Xuefu Zhang commented on HIVE-494: ---------------------------------- Yeah. I think this is useful, as long as it doesn't bring ambiguity. Original original proposal of table[0] notation is ambiguous, but the current table.$0 is good. Also, we should make sure that Hive emits an error message in case $0 cannot be uniquely identified such as in a join, similar to the case where a column's name cannot be uniquely identified. > Select columns by index instead of name > --------------------------------------- > > Key: HIVE-494 > URL: https://issues.apache.org/jira/browse/HIVE-494 > Project: Hive > Issue Type: Wish > Components: Clients, Query Processor > Reporter: Adam Kramer > Assignee: Navis > Priority: Minor > Labels: SQL > Attachments: ASF.LICENSE.NOT.GRANTED--HIVE-494.D1641.1.patch, HIVE-494.2.patch.txt, HIVE-494.D12153.1.patch > > > SELECT mytable[0], mytable[2] FROM some_table_name mytable; > ...should return the first and third columns, respectively, from mytable regardless of their column names. > The need for "names" specifically is kind of silly when they just get translated into numbers anyway. -- This message was sent by Atlassian JIRA (v6.2#6252)