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

Zheng Shao commented on HIVE-238:
---------------------------------

There is a workaround using subquery:
{code}
  SELECT t1.c1, t1.c2, t1.c3 FROM (SELECT t1.c1, t1.c2, t1.c3, t1.c1.a AS cc 
FROM t1 CLUSTER BY cc) t1;
{code}

There is no performance difference as well.


> complex columns are not handled properly in cluster by, distributed by, sort 
> by clauses and in some select clauses
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-238
>                 URL: https://issues.apache.org/jira/browse/HIVE-238
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.3.0
>            Reporter: Prasad Chakka
>            Assignee: Ashish Thusoo
>            Priority: Blocker
>
> if a column is complex then the sub fields can't be referenced in cluster by, 
> distributed by, sort by clauses
> for example if column c1 is an object with attributes a and b then the 
> following query returns an error
> select * from t1 cluster by t1.c1.a (or similar queries)
> also the following query will return an error because current code doesn't 
> distinguish between a complex column or a table alias.
> select c1.a from t1

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

Reply via email to