[ 
https://issues.apache.org/jira/browse/HIVE-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262449#comment-13262449
 ] 

Carl Steinbach commented on HIVE-494:
-------------------------------------

bq. It seemed not a standard SQL and also could be confusional especially with 
join/unions.

I'm a little worried about this too, mainly because it appears to extend SQL 
syntax and (speaking personally) I don't think I fully understand the long term 
impact of a change like this. If it turns out that this syntax is broken, 
deprecating it is going to be painful for all of the people who start using it.

bq. Could it be worth to be implemented?

I think we should pass on this unless it turns out to be part of standard SQL, 
or we can point to some other DB like MySQL that already implements it. On a 
related note, HIVE-1947 covers implementing similar syntax for the ORDER BY 
clause, and it turns out that this *is* part of standard SQL. It's also 
interesting to note that ordinal column references in the WHERE clause aren't 
supported since it would result in ambiguous statements like this:

{noformat}
SELECT a, b from src
WHERE 1=1;
{noformat}

                
> 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: HIVE-494.D1641.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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to