[ https://issues.apache.org/jira/browse/HIVE-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12870475#action_12870475 ]
Arvind Prabhakar commented on HIVE-1179: ---------------------------------------- bq. One minor point - can you make result a member variable of GenericUDFArrayContains? This will reduce object creation. While this will reduce object creation, it will cause correctness problems when this UDF is used in an aggregate operation. Using a member variable for {{result}} would then mean that all values of aggregated output will always reflect the evaluated value of the last row. A similar problem would occur if there is a lag between collecting and processing of output values. Hence my preference is to keep the implementation as is (stateless). If you still would like to make it a member variable, please let me know and I can make that change. > Add UDF array_contains > ---------------------- > > Key: HIVE-1179 > URL: https://issues.apache.org/jira/browse/HIVE-1179 > Project: Hadoop Hive > Issue Type: New Feature > Reporter: Zheng Shao > Assignee: Arvind Prabhakar > Attachments: HIVE-1179-1.patch, HIVE-1179-2.patch, HIVE-1179.patch > > > Returns true or false, depending on whether an element is in an array. > {{array_contains(T element, array<T> theArray)}} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.