[ https://issues.apache.org/jira/browse/HIVE-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12871331#action_12871331 ]
Arvind Prabhakar commented on HIVE-1179: ---------------------------------------- I took a quick look at the various Operator implementations and found that the ones that store any evaluated expression results end up creating copies anyway - {{ObjectInspectorUtils.copyToStandardObject()}}. So although it appears that the system is working normally by reusing the object instance at the UDF level, code elsewhere in the system is forced to do the defensive copying. To clarify, my concern is not regarding a problem that may currently exist - but the potential problems that could occur due to not making defensive copies of mutable objects. If you are certain that this is does not apply to Hive implementation, then the updated patch should be fine for pushing in. > 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-3.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.