hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gopal Vijayaraghavan <>
Subject Re: Simple UDFS and IN Operator
Date Wed, 09 Mar 2016 00:28:46 GMT

>   In Hive 0.11, I¹ve written a UDF that returns a list of Integers. I¹d
>like to use this in a WHERE clause of a query, something like SELECT *
>FROM <table> WHERE <col>  in ( getList()).
> Joins would be ideal, but we haven¹t upgraded yet.

IN() is actually rewritten into a JOIN (distinct ...) internally, but if
that is your only goal, Hive should still allow you to do that using the
array functions.

where array_contains(getList(), <col>);


View raw message