hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-2506) Get ConstantObjectInspectors working in UDAFs
Date Mon, 17 Oct 2011 02:20:13 GMT

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

jiraposter@reviews.apache.org commented on HIVE-2506:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2400/
-----------------------------------------------------------

Review request for Carl Steinbach, John Sichi and Igor Kabiljo.


Summary
-------

ConstantOIs are awesome in UDFs, let's also support them in UDAFs.  Some side things that
needed to happen to make this a reality:

1.) The GenericUDAFParameterInfo was changed to also support ObjectInspectors (and store things
in OI rather than TypeInfo format).  This ensures that info is most flexibly available to
the UDAF, and UDAFs no longer need to understand how to manipulate both TI and OI. 
2.) SemanticAnalyzer and FunctionRegistry was changed to use OIs in the node creation process
rather than converting back and forth between TI and OI.
3.) AbstractGenericUDAFResolver now overrides the TI method so that subclasses of this don't
have to implement both methods.
4.) Changed PercentileApprox as an example of what can be done with the new interface.  Things
are simplified since the number of buckets and quantiles are known in advance.


This addresses bug HIVE-2506.
    https://issues.apache.org/jira/browse/HIVE-2506


Diffs
-----

  ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java cbbfffb 
  ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 1110cfa 
  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/AbstractGenericUDAFResolver.java 766e473

  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFParameterInfo.java 04cfc28

  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDAFPercentileApprox.java 678607b

  ql/src/java/org/apache/hadoop/hive/ql/udf/generic/SimpleGenericUDAFParameterInfo.java 3277b98


Diff: https://reviews.apache.org/r/2400/diff


Testing
-------

udaf_percentile_approx.q


Thanks,

Jonathan


                
> Get ConstantObjectInspectors working in UDAFs
> ---------------------------------------------
>
>                 Key: HIVE-2506
>                 URL: https://issues.apache.org/jira/browse/HIVE-2506
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Jonathan Chang
>            Assignee: Jonathan Chang
>         Attachments: HIVE-2506.patch
>
>
> ConstantObjectInspectors seem to do the right thing for UDFs, but don't work yet for
UDAFs, in part of the complex getEvaluator path which converts back and forth between TypeInfo
and ObjectInspectors.  We should add an interface so that UDAFs can operate entirely on ObjectInspectors
and expose constantness to these UDAFs.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message