Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Java UDF returning different output while calling inside hive queries

avatar
New Contributor

Hi,

When I call the java UDF inside hive, it returns different result than the one returned in IDE. Attached are the screenshots for the same. The output in Hive is inconsistent as sometimes it does return expected. Any possible explanation for this behavior?

The UDF is supposed to removed duplicates and return the output in same order but in lowercase.

7048-hive-udf-output2.png


ide-udf-output.pnghive-udf-output.png
1 ACCEPTED SOLUTION

avatar
New Contributor

Found the issue! probably LinkedHashSet lib is missing in hive!

View solution in original post

3 REPLIES 3

avatar
Super Guru

@abhi singh Can you please share your code for evaluate method?

avatar
New Contributor

7050-java-udf-code.png

Hi @mqureshi, attached is the udf code

avatar
New Contributor

Found the issue! probably LinkedHashSet lib is missing in hive!