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

Jesus Camacho Rodriguez commented on HIVE-12301:
------------------------------------------------

It seems like a copy-paste error.

[~pxiong], with the patch, the name is taken from rsColInfoLst. If we have a 
DISTINCT aggregate function, the name is replaced by a hard-coded-autogenerated 
column name. 

It seems to me that the complete solution would be to rewrite that part of 
genReduceSideGB1NoMapGB so we rely on the {{udafParamsIndxInGBInfoDistExprs}} 
data structure, as the genReduceSideGB1 does.
Did you consider this solution? Is it feasible? It certainly would be a better 
practice than hard-coding the name of a column as it is done now.

Further, could we add a test for UDAF referencing a column with DISTINCT to 
check that hits this path, to verify that both cases are working as expected?

Thanks

> CBO: Calcite Operator To Hive Operator (Calcite Return Path): fix test 
> failure for udf_percentile.q
> ---------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-12301
>                 URL: https://issues.apache.org/jira/browse/HIVE-12301
>             Project: Hive
>          Issue Type: Sub-task
>          Components: CBO
>            Reporter: Pengcheng Xiong
>            Assignee: Pengcheng Xiong
>         Attachments: HIVE-12301.01.patch
>
>
> The position in argList is mapped to a wrong column from RS operator



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to