Hi all, How can I implement a binary search in pig? In one relation, there exists a bag whose items are sorted. And I want to check there exists a specific item in the bag.
In UDF, I can't random access items in DataBag container. So I have to transfer the items in DataBag to an ArrayList, and this is time consuming. How can I implement the binary search efficiently in pig?
