[ https://issues.apache.org/jira/browse/HIVE-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884770#action_12884770 ]
John Sichi commented on HIVE-287: --------------------------------- A couple of DBMS's I just tried actually do use something equivalent to that grammar snippet I quoted. {noformat} mysql> select sum(*) from TBLS; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) from TBLS' at line 1 {noformat} {noformat} 0: jdbc:luciddb:> select sum(*) from sys_root.dba_tables; Error: At line 1, column 12: Unknown identifier '*' (state=,code=0) {noformat} But I'm fine with leaving the grammar as B and doing the check inside of SemanticAnalyzer instead as long as your negative tests demonstrate that the diagnostics are good if a user tries something like sum(*). However, for this part: "Since you feel strongly about not supporting this syntax by default for any function, I can perhaps modify the AbstractGenericUDAFResolver class to raise an exception if invoked with this syntax. That way, only the functions that choose to overwrite that behavior will be able to support it." It's not just a matter of not supporting it by default. I don't think we should support it at all, so let's prevent inside of SemanticAnalyzer and then not expose it at the resolver level at all. If in early days, the SQL people had just done the smart thing and made the "count all" expression COUNT() instead of COUNT(*), we wouldn't even be having this discussion. > count distinct on multiple columns does not work > ------------------------------------------------ > > Key: HIVE-287 > URL: https://issues.apache.org/jira/browse/HIVE-287 > Project: Hadoop Hive > Issue Type: Bug > Components: Query Processor > Reporter: Namit Jain > Assignee: Arvind Prabhakar > Attachments: HIVE-287-1.patch, HIVE-287-2.patch, HIVE-287-3.patch, > HIVE-287-4.patch > > > The following query does not work: > select count(distinct col1, col2) from Tbl -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.