phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anchal Agrawal <anc...@yahoo-inc.com>
Subject Re: Mismatched output with 2 UDFs in a query
Date Thu, 06 Aug 2015 00:04:10 GMT
Hi Nicholas,
Yes, I'm getting the same issue (HBase 0.98.8). On my setup, if I run:select pk, udf1(pk),
udf2(pk) from "mytable" I get pk, udf1(pk), udf1(pk)

And if I run:select pk, udf2(pk), udf1(pk) from "mytable" I get pk, udf2(pk), udf2(pk)

It appears to be picking up the first UDF. However, in Query 3 (from my previous email), when
the second UDF is in the WHERE clause, the second UDF is picked up instead of the first one.
Sincerely,Anchal
 


     On Wednesday, August 5, 2015 4:45 PM, Nicholas Whitehead <whitehead.nicholas@gmail.com>
wrote:
   

 Hmm... I opened a jira ticket on that, but then my simplified test case could not reproduce.https://issues.apache.org/jira/browse/PHOENIX-2151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanelLook
the same ?Hi,
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"
UNSIGNED_LONG);
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


   
Mime
View raw message