[ https://issues.apache.org/jira/browse/HIVE-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Chang updated HIVE-1360: --------------------------------- Status: Patch Available (was: Open) HIVE-1360. It has been a long-standing request for UDFs to be able to Edit access parameter values. This not only enables significant performance improvement possibilities, it also allows for fundamentally richer behavior, such as allowing the output type of a UDF to depend on its inputs. The strategy in this diff is to introduce the notion of a ConstantObjectInspector, like a regular ObjectInspector except that it encapsulates a constant value and knows what this constant value is. These COIs are created through a factory method by ExprNodeConstantDesc during plan generation hence UDFs will be able to capture these constant values during the initialize phase. Furthermore, because these ConstantObjectInspectors are simply subinterfaces of ObjectInspector, UDFs which are not "constant-aware" receive ObjectInspectors which also implement the same interfaces they are used to, so no special handling needs to be done for existing UDFs. An example UDF which uses this new functionality is also included in this diff. NAMED_STRUCT is like STRUCT except that it also allows users to specify the names of the fields of the struct, something previously not possible because the names of the fields must be known at compile time. Also see this pull request: https://github.com/apache/hive/pull/2 > Allow UDFs to access constant parameter values at compile time > -------------------------------------------------------------- > > Key: HIVE-1360 > URL: https://issues.apache.org/jira/browse/HIVE-1360 > Project: Hive > Issue Type: Improvement > Components: Query Processor, UDF > Affects Versions: 0.5.0 > Reporter: Carl Steinbach > Assignee: Carl Steinbach > Attachments: HIVE-1360.patch > > > UDFs should be able to access constant parameter values at compile time. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira