You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Shrikrishna Lawande (JIRA)" <ji...@apache.org> on 2010/10/01 13:11:34 UTC
[jira] Created: (HIVE-1683) Column aliases cannot be used in a
group by clause
Column aliases cannot be used in a group by clause
--------------------------------------------------
Key: HIVE-1683
URL: https://issues.apache.org/jira/browse/HIVE-1683
Project: Hadoop Hive
Issue Type: Bug
Components: Metastore
Reporter: Shrikrishna Lawande
Column aliases cannot be used in a group by clause
Following query would fail :
select col1 as t, count(col2) from test group by t;
FAILED: Error in semantic analysis: line 1:49 Invalid Table Alias or Column Reference t
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HIVE-1683) Column aliases cannot be used in a
group by clause
Posted by "John Sichi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916960#action_12916960 ]
John Sichi commented on HIVE-1683:
----------------------------------
This is not a bug and should be closed as invalid. Conceptually, GROUP BY processing happens before SELECT list computation, so it would be circular to allow such references.
> Column aliases cannot be used in a group by clause
> --------------------------------------------------
>
> Key: HIVE-1683
> URL: https://issues.apache.org/jira/browse/HIVE-1683
> Project: Hadoop Hive
> Issue Type: Bug
> Components: Metastore
> Reporter: Shrikrishna Lawande
>
> Column aliases cannot be used in a group by clause
> Following query would fail :
> select col1 as t, count(col2) from test group by t;
> FAILED: Error in semantic analysis: line 1:49 Invalid Table Alias or Column Reference t
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HIVE-1683) Column aliases cannot be used in a
group by clause
Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916953#action_12916953 ]
Namit Jain commented on HIVE-1683:
----------------------------------
A workaround is to use the original expression:
select col1, count(col2) from test group by col1;
> Column aliases cannot be used in a group by clause
> --------------------------------------------------
>
> Key: HIVE-1683
> URL: https://issues.apache.org/jira/browse/HIVE-1683
> Project: Hadoop Hive
> Issue Type: Bug
> Components: Metastore
> Reporter: Shrikrishna Lawande
>
> Column aliases cannot be used in a group by clause
> Following query would fail :
> select col1 as t, count(col2) from test group by t;
> FAILED: Error in semantic analysis: line 1:49 Invalid Table Alias or Column Reference t
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.