You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2013/11/19 18:29:24 UTC

[jira] [Resolved] (HIVE-1922) semantic analysis error, when using group by and order by together

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

Ashutosh Chauhan resolved HIVE-1922.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.13.0
         Assignee: Harish Butani

This is fixed via HIVE-3107. Feel free to reopen if there are still cases which should be supported and currently are not.

> semantic analysis error, when using group by and order by together
> ------------------------------------------------------------------
>
>                 Key: HIVE-1922
>                 URL: https://issues.apache.org/jira/browse/HIVE-1922
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.7.0
>         Environment: Ubuntu Karmic, hadoop 0.20.0, hive 0.7.0
>            Reporter: Hongwei
>            Assignee: Harish Butani
>            Priority: Critical
>             Fix For: 0.13.0
>
>         Attachments: HIVE-1922.1.patch.txt
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> When I tried queries like, 'select t.c from t  group by t.c sort by t.c;', hive reported error ,'FAILED: Error in semantic analysis: line 1:40 Invalid Table Alias or Column Reference t'.
> But 'select t.c from t  group by t.c ' or 'select t.c from t  sort by t.c;' are ok. 
> 'select t.c from t  group by t.c sort by c;' is ok too.
> The hive server gives stack trace like
> 11/01/20 03:07:34 INFO parse.SemanticAnalyzer: Get metadata for subqueries
> 11/01/20 03:07:34 INFO parse.SemanticAnalyzer: Get metadata for destination tables
> 11/01/20 03:07:34 INFO parse.SemanticAnalyzer: Completed getting MetaData in Semantic Analysis
> FAILED: Error in semantic analysis: line 1:40 Invalid Table Alias or Column Reference t
> 11/01/20 03:07:34 ERROR ql.Driver: FAILED: Error in semantic analysis: line 1:40 Invalid Table Alias or Column Reference t
> org.apache.hadoop.hive.ql.parse.SemanticException: line 1:40 Invalid Table Alias or Column Reference t
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genExprNodeDesc(SemanticAnalyzer.java:6743)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genReduceSinkPlan(SemanticAnalyzer.java:4288)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genBodyPlan(SemanticAnalyzer.java:5446)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genPlan(SemanticAnalyzer.java:6007)
> 	at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6583)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:343)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:731)
> 	at org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:116)
> 	at org.apache.hadoop.hive.service.ThriftHive$Processor$execute.process(ThriftHive.java:699)
> 	at org.apache.hadoop.hive.service.ThriftHive$Processor.process(ThriftHive.java:677)
> 	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:662)



--
This message was sent by Atlassian JIRA
(v6.1#6144)