You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Kathiresan S <ka...@gmail.com> on 2015/05/02 21:32:02 UTC

UDF in SELECT

Hi,

I've tried the new UDF feature of Phoenix.

Below are the version details

Phoenix : master (tag : v4.4.0-HBase-0.98-rc0)
Hbase : hbase-0.98.12-hadoop2

I created a UDF and tested with a simple SELECT statement. Looks like, its
executed on the client side.

Also, in one of the JIRAs
<https://issues.apache.org/jira/browse/PHOENIX-538>, i see the statement "A
function will be evaluated on the client side if it's used in the SELECT
clause"

*Couple of quesitons:*

1.Will any function <http://phoenix.apache.org/language/functions.html> (UDF
or built-in) in a SELECT be run only on client side in Phoenix?
2.Is there an option, i can push an UDF in a SELECT query to run on server
side?

Thanks,
Kathir

Re: UDF in SELECT

Posted by Kathiresan S <ka...@gmail.com>.
Thanks Rajeshbabu.

Could you please explain the benefits of UDF, does it provide any low level
data access/performance benefits,etc.? and also, the technical difficulties
involved in running functions in a SELECT clause on server side in Phoenix
on a high level?

Thanks,
Kathir

On Sun, May 3, 2015 at 12:16 AM, rajeshbabu@apache.org <
chrajeshbabu32@gmail.com> wrote:

> Hi Kathiresan,
> Thanks for trying the UDFs.
>
> bq. 1.Will any function
> <http://phoenix.apache.org/language/functions.html> (UDF or built-in) in
> a SELECT be run only on client side in Phoenix?
> Yes. if we use a function in select clause it will be evaluated at client
> side.
>
> bq. 2.Is there an option, i can push an UDF in a SELECT query to run on
> server side?
> If you use the functions in where clause they will be pushed down to the
> server and run at server side.
> That phoenix automatically do it for you.
>
> Thanks,
> Rajeshbabu.
>
> On Sun, May 3, 2015 at 1:02 AM, Kathiresan S <kathiresanselvaraj@gmail.com
> > wrote:
>
>> Hi,
>>
>> I've tried the new UDF feature of Phoenix.
>>
>> Below are the version details
>>
>> Phoenix : master (tag : v4.4.0-HBase-0.98-rc0)
>> Hbase : hbase-0.98.12-hadoop2
>>
>> I created a UDF and tested with a simple SELECT statement. Looks like,
>> its executed on the client side.
>>
>> Also, in one of the JIRAs
>> <https://issues.apache.org/jira/browse/PHOENIX-538>, i see the statement
>> "A function will be evaluated on the client side if it's used in the
>> SELECT clause"
>>
>> *Couple of quesitons:*
>>
>> 1.Will any function <http://phoenix.apache.org/language/functions.html> (UDF
>> or built-in) in a SELECT be run only on client side in Phoenix?
>> 2.Is there an option, i can push an UDF in a SELECT query to run on
>> server side?
>>
>> Thanks,
>> Kathir
>>
>
>

Re: UDF in SELECT

Posted by "rajeshbabu@apache.org" <ch...@gmail.com>.
Hi Kathiresan,
Thanks for trying the UDFs.

bq. 1.Will any function
<http://phoenix.apache.org/language/functions.html> (UDF
or built-in) in a SELECT be run only on client side in Phoenix?
Yes. if we use a function in select clause it will be evaluated at client
side.

bq. 2.Is there an option, i can push an UDF in a SELECT query to run on
server side?
If you use the functions in where clause they will be pushed down to the
server and run at server side.
That phoenix automatically do it for you.

Thanks,
Rajeshbabu.

On Sun, May 3, 2015 at 1:02 AM, Kathiresan S <ka...@gmail.com>
wrote:

> Hi,
>
> I've tried the new UDF feature of Phoenix.
>
> Below are the version details
>
> Phoenix : master (tag : v4.4.0-HBase-0.98-rc0)
> Hbase : hbase-0.98.12-hadoop2
>
> I created a UDF and tested with a simple SELECT statement. Looks like, its
> executed on the client side.
>
> Also, in one of the JIRAs
> <https://issues.apache.org/jira/browse/PHOENIX-538>, i see the statement "A
> function will be evaluated on the client side if it's used in the SELECT
> clause"
>
> *Couple of quesitons:*
>
> 1.Will any function <http://phoenix.apache.org/language/functions.html> (UDF
> or built-in) in a SELECT be run only on client side in Phoenix?
> 2.Is there an option, i can push an UDF in a SELECT query to run on server
> side?
>
> Thanks,
> Kathir
>