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

Prasad Chakka commented on HIVE-405:
------------------------------------

Are you suggesting that we keep initializeChildren() method and override in 
MapOperator()? I think the current initialization methods has distinct 
functionalities

1) Operator.initialize() -- makes sure that all parents are initialized before 
the operator is initialized. this also initializes common structures needed for 
all operators. this the only public initialization method.
2) Operator.initializeOp() -- does operator specific initialization including 
initialization of children. It is up to the operator in what order child 
operators need to be initialized. the base implementation will just call 
initializeChildren() with the output ObjectInspector. this is a protected 
method.
3) Operator.initializeChildren() -- calls initialize() on all children. this is 
a protected method.

I think what we have here and you are proposing are pretty similar except that 
MapOperator() become more customized.

But I agree that there should be an OutputObjectInspector field in 
Operator.java and that should be used while calling initialize() on children in 
Operator.java. I will make that change.

> Cleanup operator initialization
> -------------------------------
>
>                 Key: HIVE-405
>                 URL: https://issues.apache.org/jira/browse/HIVE-405
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Prasad Chakka
>            Priority: Critical
>         Attachments: hive-405.6.patch, hive-405.7.patch, hive-405.patch
>
>
> We are always passing the same ObjectInspector, so there is no need to pass 
> it again and again in forward.
> Also there is a problem that can ONLY be fixed by passing ObjectInspector in 
> init: Outer Joins - Outer Joins may not be able to get ObjectInspectors for 
> all inputs, as a result, there is no way to construct an output 
> ObjectInspector based on the inputs. Currently we have hard-coded code that 
> assumes joins are always outputting Strings, which did break but was hidden 
> by the old framework (because we do toString() when serializing the output, 
> and toString() is defined for all Java Classes).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to