You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Yiannis Gkoufas <jo...@gmail.com> on 2015/06/22 16:23:00 UTC
Advice for UDF used in GROUP BY
Hi there,
I was just looking for some tips on implementing a UDF to be used in a
GROUP BY statement.
For instance lets say I have the table:
( (A, B), C, D) with (A,B) being the composite key
My UDF targets the field C and I want to optimize the query:
SELECT A,MYFUNCTION(C),SUM(D) FROM MYTABLE GROUP BY A,MYFUNCTION(D)
Thanks a lot!