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

Peter Vary commented on HIVE-17060:
-----------------------------------

My investigation shows, that CBO initiates the UDF twice:
1. CalcitePlannerAction.genLogicalPlan() - When generating the logical plan the 
UDF is initiated
2. CalcitePlannerAction.applyPreJoinOrderingTransforms() - When the hep planner 
optimizes the plan (planner.findBestExp()) it also initiates the UDF.

[~sershe]: I do not see an easy way to fix this. Any ideas?

Thanks,
Peter

> unix_timestamp(void) is deprecated message is printed twice
> -----------------------------------------------------------
>
>                 Key: HIVE-17060
>                 URL: https://issues.apache.org/jira/browse/HIVE-17060
>             Project: Hive
>          Issue Type: Bug
>          Components: CBO, UDF
>    Affects Versions: 1.3.0, 2.0.0
>            Reporter: Peter Vary
>            Priority: Trivial
>
> HIVE-10728 added a warning message when the unix_timestamp used without 
> parameters.
> When CBO is used, this message is printed twice.
> Minimal steps to reproduce:
> {code}
> set hive.cbo.enable = true;
> create table timestamp_test(s string);
> select unix_timestamp() from timestamp_test;
> {code}
> This duplication is even enforced by the golden files in the commit :)
> https://github.com/apache/hive/commit/24d3307be79d35d3a34c49014dfdd597112f9106#diff-bf6c9f3549aaeb2b40b8b1eab9254c4aR73



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to