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

Harish Butani commented on HIVE-4197:
-------------------------------------

Adding FileName, Offset Virtual Columns is not straightforward.
Consider the following query:
{noformat}
select p_mfgr, p_name, p_size, 
min(p_retailprice),
rank() over(partition by p_mfgr order by p_name)as r
from part
group by p_mfgr, p_name, p_size
{noformat}
Adding the VCs to the OrderSpec for rank requires that we add them to the 
Select List also; otherwise we get the error: Expression not in GROUP BY key 
'INPUT__FILE__NAME'

It gets more challenging if the Query has Joins or SubQueries. 
It will not work if the Query has a PTF(a PTF is not required to output the 
VCs).
Any suggestions?
                
> Bring windowing support inline with SQL Standard
> ------------------------------------------------
>
>                 Key: HIVE-4197
>                 URL: https://issues.apache.org/jira/browse/HIVE-4197
>             Project: Hive
>          Issue Type: Bug
>          Components: PTF-Windowing
>            Reporter: Harish Butani
>         Attachments: WindowingSpecification.pdf
>
>
> The current behavior defers from the Standard in several significant places.
> Please review attached doc; there are still a few open issues. Once we agree 
> on the behavior, can proceed with fixing the implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to