hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-405) Operators should pass ObjectInspector in init instead of forward
Date Wed, 15 Apr 2009 07:36:14 GMT

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

Zheng Shao commented on HIVE-405:

As part of the fix, ExprNodeEvaluator will have the following signature:

public abstract class ExprNodeEvaluator {

   * Initialize should be called once and only once.
   * Return the ObjectInspector for the return value, given the rowInspector.
  public abstract ObjectInspector initialize(ObjectInspector rowInspector) throws HiveException;

   * Evaluate the expression given the row.
   * This method should use the rowInspector passed in from initialize to 
   * inspect the row object.
   * The return value will be inspected by the return value of initialize. 
  public abstract Object evaluate(Object row) throws HiveException;

> Operators should pass ObjectInspector in init instead of forward
> ----------------------------------------------------------------
>                 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
>            Priority: Critical
> 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.

View raw message