hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasad Chakka (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-25) [Hive] cluster by does not work with column aliasing
Date Wed, 14 Jan 2009 00:12:59 GMT

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

Prasad Chakka commented on HIVE-25:

I will change Hive.g so that sortOrder in DDL can only have identifiers and not column refs.

The way I want to do this is to allow select columns to be referenced in cluster/distributed/sort
clauses according to following rules

1) column has an alias in the select clause. this column can only be referred with the alias
in the above 3 clauses
2) column doesn't have an alias but it may have table alias. this column can be referred with
the columnName or tabAlias.columnName in the above 3 clauses.

where clause can only contain tabAlias.columnName and is different from above rules.

I will upload modified patch with tests for all the above conditions. How about it?

> [Hive] cluster by does not work with column aliasing
> ----------------------------------------------------
>                 Key: HIVE-25
>                 URL: https://issues.apache.org/jira/browse/HIVE-25
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: Namit Jain
>            Assignee: Prasad Chakka
>            Priority: Critical
>             Fix For: 0.2.0
>         Attachments: hive-25-code-changes.patch, hive-25.patch
>                     SELECT b.*  
>                     FROM                                                 
>                     (                                                    
>                       SELECT x.col1, x.col2
>                       FROM tmp x              
>                       WHERE x.col2= 10
>                       CLUSTER BY col2                                  
>                     ) b"
> The above query works, but if I change the cluster by to:
> CLUSTER BY x.col2, 
> it croaks.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message