{"shas":[["df6bc4d1026b5f17feb811fd50292f81df86b71b","6214dd71b91544f0a1b45cfb6f240d3b05d793f5@fb.com","HIVE-1360.  It has been a long-standing request for UDFs to be able to\naccess parameter values.  This not only enables significant performance\nimprovement possibilities, it also allows for fundamentally richer\nbehavior, such as allowing the output type of a UDF to depend on its\ninputs.\n\nThe strategy in this diff is to introduce the notion of a\nConstantObjectInspector, like a regular ObjectInspector except that it\nencapsulates a constant value and knows what this constant value is.\nThese COIs are created through a factory method by ExprNodeConstantDesc\nduring plan generation hence UDFs will be able to capture these constant\nvalues during the initialize phase.  Furthermore, because these\nConstantObjectInspectors are simply subinterfaces of ObjectInspector,\nUDFs which are not \"constant-aware\" receive ObjectInspectors which\nalso implement the same interfaces they are used to, so no special\nhandling needs to be done for existing UDFs.\n\nAn example UDF which uses this new functionality is also included in\nthis diff.  NAMED_STRUCT is like STRUCT except that it also allows users\nto specify the *names* of the fields of the struct, something previously\nnot possible because the names of the fields must be known at compile\ntime.","Jonathan Chang"]],"ref":"refs/heads/trunk","size":1,"head":"df6bc4d1026b5f17feb811fd50292f81df86b71b","push_id":39217194}