[
https://issues.apache.org/jira/browse/DRILL-1248?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16609079#comment-16609079
]
ASF GitHub Bot commented on DRILL-1248:
---------------------------------------
arina-ielchiieva opened a new pull request #1461: DRILL-1248: Allow positional
/ named aliases in group by / having clauses
URL: https://github.com/apache/drill/pull/1461
Details in [DRILL-1248](https://issues.apache.org/jira/browse/DRILL-1248).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add support for using aliases in group by
> -----------------------------------------
>
> Key: DRILL-1248
> URL: https://issues.apache.org/jira/browse/DRILL-1248
> Project: Apache Drill
> Issue Type: Improvement
> Components: SQL Parser
> Reporter: Jim Scott
> Assignee: Arina Ielchiieva
> Priority: Major
> Labels: doc-impacting
> Fix For: 1.15.0
>
>
> when I select using a function and alias the resultant function value it
> won't parse properly saying the alias is ambiguous. I know that this is a
> debatable / questionable topic, but with this engine being so flexible it
> seems that in order to support all of the formatting, casting, etc.. that
> will likely occur having the group by support an alias would be a big deal.
> This in my opinion is nothing like an ordinal group by.
> This works:
> select extract(year from to_date(crimes.datetime, 'MM/DD/YYYY hh:mm:ss a'))
> from BLAH group by extract(year from to_date(crimes.datetime, 'MM/DD/YYYY
> hh:mm:ss a'));
> This doesn't:
> select extract(year from to_date(crimes.datetime, 'MM/DD/YYYY hh:mm:ss a'))
> as mygroup from BLAH group by mygroup
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)