[
https://issues.apache.org/jira/browse/HIVE-11193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14619210#comment-14619210
]
Ashutosh Chauhan commented on HIVE-11193:
-----------------------------------------
I wonder if {{opToDelete}} list contains these operators from first phase. If
so, than we can just do {{cppCtx.getOpToDelete().clear()}} at end of
ConstantPropagate::transform() If that indeed is the case, then it will be
preferable to do that since in that case we dont have to worry about hashcode()
implementation of different operators.
> ConstantPropagateProcCtx should use a Set instead of a List to hold operators
> to be deleted
> -------------------------------------------------------------------------------------------
>
> Key: HIVE-11193
> URL: https://issues.apache.org/jira/browse/HIVE-11193
> Project: Hive
> Issue Type: Bug
> Components: Logical Optimizer
> Reporter: Wei Zheng
> Assignee: Wei Zheng
> Attachments: HIVE-11193.01.patch
>
>
> During Constant Propagation optimization, sometimes a node ends up being
> added to opToDelete list more than once.
> Later in ConstantPropagate transform, we try to delete that operator multiple
> times, which will cause SemanticException since the node has already been
> removed in an earlier pass.
> The data structure for storing opToDelete is List. We should use Set to avoid
> the problem.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)