phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anchal Agrawal <>
Subject Mismatched output with 2 UDFs in a query
Date Wed, 05 Aug 2015 22:44:01 GMT
I'm using v4.4.0. I'm getting mismatched output when I use two UDFs in a query.

Phoenix view of existing HBase table: create view "mytable" (pk VARBINARY PRIMARY KEY, "cf"."col"
UDF1: create function udf1(VARBINARY) returns UNSIGNED_LONG as 'mypkg.GetX';UDF2: create function
udf2(VARBINARY) returns INTEGER as 'mypkg.GetY';Query1: select udf1(pk), udf2(pk) from "mytable";Query2:
select udf2(pk), udf1(pk) from "mytable";Query3: select udf1(pk), "col" from "mytable" where
udf2(pk) > 0;
Query 1: The output has two columns, but they're both udf1(pk) so both columns have the same
rows in the output.Query 2: Same as Query 1, except that both columns are udf2(pk).
Query 3: The output has two columns, udf2(pk) and "col", instead of udf1(pk) and "col". 

If I have just one UDF in a query, like so: select pk, udf2(pk) from "mytable"; 
then the output is as expected.

I'm not sure what I'm missing. Rajeshbabu, is there a caveat associated with using two UDFs
in one query? I appreciate your help.

Thank you,Anchal

View raw message