[ 
https://issues.apache.org/jira/browse/HIVE-494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adam Kramer updated HIVE-494:
-----------------------------

    Description: 
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.

  was:
In a very real sense, tables are like arrays or matrices with rows and columns. 
IT would be fantastic if I could refer to columns in my select statement by 
their index, rather than by their name.

SELECT mytable[0], mytable[2] FROM some_table_name mytable;

...which would then get the first and third column from mytable. We already 
have syntax like this for array data types, which I think would translate 
nicely: SELECT mytable[0][3], etc.

Or maybe I just spend too much time coding in R...

       Priority: Minor  (was: Major)
        Summary: Select columns by index instead of name  (was: Select columns 
by number instead of name)

> 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
>            Priority: Minor
>              Labels: SQL
>
> 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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to