You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by Swapna Swapna <ta...@gmail.com> on 2016/01/29 22:47:57 UTC

Implement Custom Aggregate Functions in Phoenix

Hi,

I would like to know the approach to implement and register custom
aggregate functions in Phoenix like the way we have built-in aggregate
functions like SUM, COUNT,etc

Please help.

Thanks
Swapna

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
Thank you James for providing the URL, I will be trying today as per the
directions.

On Thu, Mar 17, 2016 at 6:52 PM, James Taylor <ja...@apache.org>
wrote:

> No need to register your custom UDFs. Did you see these directions:
> https://phoenix.apache.org/udf.html#How_to_write_custom_UDF?
>
> Have you tried it yet?
>
> On Thu, Mar 17, 2016 at 6:49 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Yes, we do have support UPPER and LOWER. I just provided as an example to
>> refer to UDF.
>>
>> For custom UDF's, i understand that we can go ahead and create custom UDF
>> jar.
>>
>> but how do we register that function?
>>
>> As per the blog, i found the below lines:
>>
>> *Finally, we'll need to register our new function. For this, you'll need
>> to edit the ExpressionType enum and include your new built-in function.
>> There's room for improvement here to allow registration of user defined
>> functions outside of the phoenix jar. However, you'd need to be able to
>> ensure your class is available on the HBase server class path since this
>> will be executed on the server side at runtime.*
>>
>>  Does that mean, to register my custom function, i should edit the *ExpressionType
>> enum *exists in Phoenix and rebuild the *phoenix jar?*
>>
>>
>>
>>
>> On Thu, Mar 17, 2016 at 6:17 PM, James Taylor <ja...@apache.org>
>> wrote:
>>
>>> No, custom UDFs can be added dynamically as described here:
>>> https://phoenix.apache.org/udf.html. No need to re-build Phoenix. It's
>>> just custom aggregates that would require rebuilding.
>>>
>>> FYI, we have support for UPPER and LOWER already.
>>>
>>> On Thu, Mar 17, 2016 at 6:09 PM, Swapna Swapna <ta...@gmail.com>
>>> wrote:
>>>
>>>> Thank you James for swift response.
>>>>
>>>> is the process (adding to phoenix-core and rebuild the jar)  remains
>>>> the same for custom UDF's as well  (like as for custom aggregate functions)?
>>>>
>>>> ex: we have UDF's like  UPPER, LOWER ,etc
>>>>
>>>> On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi Swapna,
>>>>> We don't support custom aggregate functions, only scalar functions
>>>>> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
>>>>> to phoenix-core and rebuild the jar. We're open to adding them to the code
>>>>> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
>>>>> NTH_VALUE made it in.
>>>>> Thanks,
>>>>> James
>>>>>
>>>>> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <
>>>>> talktoswapna@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I found this in Phoenix UDF documentation:
>>>>>>
>>>>>>    - After compiling your code to a jar, you need to deploy the jar
>>>>>>    into the HDFS. It would be better to add the jar to HDFS folder configured
>>>>>>    for hbase.dynamic.jars.dir.
>>>>>>
>>>>>>
>>>>>> My question is, can that be any 'udf-user-specific' jar which need to
>>>>>> be copied to HDFS or would it need to register the function and update the
>>>>>> custom UDF classes inside phoenix-core.jar and rebuild the
>>>>>> 'phoenix-core.jar'
>>>>>>
>>>>>> Regards
>>>>>> Swapna
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <jamestaylor@apache.org
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi Swapna,
>>>>>>> We currently don't support custom aggregate UDF, and it looks like
>>>>>>> you found the JIRA here: PHOENIX-2069. It would be a natural extension of
>>>>>>> UDFs. Would be great to capture your use case and requirements on the JIRA
>>>>>>> to make sure the functionality will meet your needs.
>>>>>>> Thanks,
>>>>>>> James
>>>>>>>
>>>>>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <
>>>>>>> talktoswapna@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I would like to know the approach to implement and register custom
>>>>>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>>>>>> functions like SUM, COUNT,etc
>>>>>>>>
>>>>>>>> Please help.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Swapna
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
Thank you James for providing the URL, I will be trying today as per the
directions.

On Thu, Mar 17, 2016 at 6:52 PM, James Taylor <ja...@apache.org>
wrote:

> No need to register your custom UDFs. Did you see these directions:
> https://phoenix.apache.org/udf.html#How_to_write_custom_UDF?
>
> Have you tried it yet?
>
> On Thu, Mar 17, 2016 at 6:49 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Yes, we do have support UPPER and LOWER. I just provided as an example to
>> refer to UDF.
>>
>> For custom UDF's, i understand that we can go ahead and create custom UDF
>> jar.
>>
>> but how do we register that function?
>>
>> As per the blog, i found the below lines:
>>
>> *Finally, we'll need to register our new function. For this, you'll need
>> to edit the ExpressionType enum and include your new built-in function.
>> There's room for improvement here to allow registration of user defined
>> functions outside of the phoenix jar. However, you'd need to be able to
>> ensure your class is available on the HBase server class path since this
>> will be executed on the server side at runtime.*
>>
>>  Does that mean, to register my custom function, i should edit the *ExpressionType
>> enum *exists in Phoenix and rebuild the *phoenix jar?*
>>
>>
>>
>>
>> On Thu, Mar 17, 2016 at 6:17 PM, James Taylor <ja...@apache.org>
>> wrote:
>>
>>> No, custom UDFs can be added dynamically as described here:
>>> https://phoenix.apache.org/udf.html. No need to re-build Phoenix. It's
>>> just custom aggregates that would require rebuilding.
>>>
>>> FYI, we have support for UPPER and LOWER already.
>>>
>>> On Thu, Mar 17, 2016 at 6:09 PM, Swapna Swapna <ta...@gmail.com>
>>> wrote:
>>>
>>>> Thank you James for swift response.
>>>>
>>>> is the process (adding to phoenix-core and rebuild the jar)  remains
>>>> the same for custom UDF's as well  (like as for custom aggregate functions)?
>>>>
>>>> ex: we have UDF's like  UPPER, LOWER ,etc
>>>>
>>>> On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi Swapna,
>>>>> We don't support custom aggregate functions, only scalar functions
>>>>> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
>>>>> to phoenix-core and rebuild the jar. We're open to adding them to the code
>>>>> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
>>>>> NTH_VALUE made it in.
>>>>> Thanks,
>>>>> James
>>>>>
>>>>> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <
>>>>> talktoswapna@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I found this in Phoenix UDF documentation:
>>>>>>
>>>>>>    - After compiling your code to a jar, you need to deploy the jar
>>>>>>    into the HDFS. It would be better to add the jar to HDFS folder configured
>>>>>>    for hbase.dynamic.jars.dir.
>>>>>>
>>>>>>
>>>>>> My question is, can that be any 'udf-user-specific' jar which need to
>>>>>> be copied to HDFS or would it need to register the function and update the
>>>>>> custom UDF classes inside phoenix-core.jar and rebuild the
>>>>>> 'phoenix-core.jar'
>>>>>>
>>>>>> Regards
>>>>>> Swapna
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <jamestaylor@apache.org
>>>>>> > wrote:
>>>>>>
>>>>>>> Hi Swapna,
>>>>>>> We currently don't support custom aggregate UDF, and it looks like
>>>>>>> you found the JIRA here: PHOENIX-2069. It would be a natural extension of
>>>>>>> UDFs. Would be great to capture your use case and requirements on the JIRA
>>>>>>> to make sure the functionality will meet your needs.
>>>>>>> Thanks,
>>>>>>> James
>>>>>>>
>>>>>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <
>>>>>>> talktoswapna@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I would like to know the approach to implement and register custom
>>>>>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>>>>>> functions like SUM, COUNT,etc
>>>>>>>>
>>>>>>>> Please help.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Swapna
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by James Taylor <ja...@apache.org>.
No need to register your custom UDFs. Did you see these directions:
https://phoenix.apache.org/udf.html#How_to_write_custom_UDF?

Have you tried it yet?

On Thu, Mar 17, 2016 at 6:49 PM, Swapna Swapna <ta...@gmail.com>
wrote:

> Yes, we do have support UPPER and LOWER. I just provided as an example to
> refer to UDF.
>
> For custom UDF's, i understand that we can go ahead and create custom UDF
> jar.
>
> but how do we register that function?
>
> As per the blog, i found the below lines:
>
> *Finally, we'll need to register our new function. For this, you'll need
> to edit the ExpressionType enum and include your new built-in function.
> There's room for improvement here to allow registration of user defined
> functions outside of the phoenix jar. However, you'd need to be able to
> ensure your class is available on the HBase server class path since this
> will be executed on the server side at runtime.*
>
>  Does that mean, to register my custom function, i should edit the *ExpressionType
> enum *exists in Phoenix and rebuild the *phoenix jar?*
>
>
>
>
> On Thu, Mar 17, 2016 at 6:17 PM, James Taylor <ja...@apache.org>
> wrote:
>
>> No, custom UDFs can be added dynamically as described here:
>> https://phoenix.apache.org/udf.html. No need to re-build Phoenix. It's
>> just custom aggregates that would require rebuilding.
>>
>> FYI, we have support for UPPER and LOWER already.
>>
>> On Thu, Mar 17, 2016 at 6:09 PM, Swapna Swapna <ta...@gmail.com>
>> wrote:
>>
>>> Thank you James for swift response.
>>>
>>> is the process (adding to phoenix-core and rebuild the jar)  remains
>>> the same for custom UDF's as well  (like as for custom aggregate functions)?
>>>
>>> ex: we have UDF's like  UPPER, LOWER ,etc
>>>
>>> On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
>>> wrote:
>>>
>>>> Hi Swapna,
>>>> We don't support custom aggregate functions, only scalar functions
>>>> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
>>>> to phoenix-core and rebuild the jar. We're open to adding them to the code
>>>> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
>>>> NTH_VALUE made it in.
>>>> Thanks,
>>>> James
>>>>
>>>> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <talktoswapna@gmail.com
>>>> > wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I found this in Phoenix UDF documentation:
>>>>>
>>>>>    - After compiling your code to a jar, you need to deploy the jar
>>>>>    into the HDFS. It would be better to add the jar to HDFS folder configured
>>>>>    for hbase.dynamic.jars.dir.
>>>>>
>>>>>
>>>>> My question is, can that be any 'udf-user-specific' jar which need to
>>>>> be copied to HDFS or would it need to register the function and update the
>>>>> custom UDF classes inside phoenix-core.jar and rebuild the
>>>>> 'phoenix-core.jar'
>>>>>
>>>>> Regards
>>>>> Swapna
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Hi Swapna,
>>>>>> We currently don't support custom aggregate UDF, and it looks like
>>>>>> you found the JIRA here: PHOENIX-2069. It would be a natural extension of
>>>>>> UDFs. Would be great to capture your use case and requirements on the JIRA
>>>>>> to make sure the functionality will meet your needs.
>>>>>> Thanks,
>>>>>> James
>>>>>>
>>>>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <
>>>>>> talktoswapna@gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I would like to know the approach to implement and register custom
>>>>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>>>>> functions like SUM, COUNT,etc
>>>>>>>
>>>>>>> Please help.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Swapna
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by James Taylor <ja...@apache.org>.
No need to register your custom UDFs. Did you see these directions:
https://phoenix.apache.org/udf.html#How_to_write_custom_UDF?

Have you tried it yet?

On Thu, Mar 17, 2016 at 6:49 PM, Swapna Swapna <ta...@gmail.com>
wrote:

> Yes, we do have support UPPER and LOWER. I just provided as an example to
> refer to UDF.
>
> For custom UDF's, i understand that we can go ahead and create custom UDF
> jar.
>
> but how do we register that function?
>
> As per the blog, i found the below lines:
>
> *Finally, we'll need to register our new function. For this, you'll need
> to edit the ExpressionType enum and include your new built-in function.
> There's room for improvement here to allow registration of user defined
> functions outside of the phoenix jar. However, you'd need to be able to
> ensure your class is available on the HBase server class path since this
> will be executed on the server side at runtime.*
>
>  Does that mean, to register my custom function, i should edit the *ExpressionType
> enum *exists in Phoenix and rebuild the *phoenix jar?*
>
>
>
>
> On Thu, Mar 17, 2016 at 6:17 PM, James Taylor <ja...@apache.org>
> wrote:
>
>> No, custom UDFs can be added dynamically as described here:
>> https://phoenix.apache.org/udf.html. No need to re-build Phoenix. It's
>> just custom aggregates that would require rebuilding.
>>
>> FYI, we have support for UPPER and LOWER already.
>>
>> On Thu, Mar 17, 2016 at 6:09 PM, Swapna Swapna <ta...@gmail.com>
>> wrote:
>>
>>> Thank you James for swift response.
>>>
>>> is the process (adding to phoenix-core and rebuild the jar)  remains
>>> the same for custom UDF's as well  (like as for custom aggregate functions)?
>>>
>>> ex: we have UDF's like  UPPER, LOWER ,etc
>>>
>>> On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
>>> wrote:
>>>
>>>> Hi Swapna,
>>>> We don't support custom aggregate functions, only scalar functions
>>>> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
>>>> to phoenix-core and rebuild the jar. We're open to adding them to the code
>>>> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
>>>> NTH_VALUE made it in.
>>>> Thanks,
>>>> James
>>>>
>>>> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <talktoswapna@gmail.com
>>>> > wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I found this in Phoenix UDF documentation:
>>>>>
>>>>>    - After compiling your code to a jar, you need to deploy the jar
>>>>>    into the HDFS. It would be better to add the jar to HDFS folder configured
>>>>>    for hbase.dynamic.jars.dir.
>>>>>
>>>>>
>>>>> My question is, can that be any 'udf-user-specific' jar which need to
>>>>> be copied to HDFS or would it need to register the function and update the
>>>>> custom UDF classes inside phoenix-core.jar and rebuild the
>>>>> 'phoenix-core.jar'
>>>>>
>>>>> Regards
>>>>> Swapna
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>>>>> wrote:
>>>>>
>>>>>> Hi Swapna,
>>>>>> We currently don't support custom aggregate UDF, and it looks like
>>>>>> you found the JIRA here: PHOENIX-2069. It would be a natural extension of
>>>>>> UDFs. Would be great to capture your use case and requirements on the JIRA
>>>>>> to make sure the functionality will meet your needs.
>>>>>> Thanks,
>>>>>> James
>>>>>>
>>>>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <
>>>>>> talktoswapna@gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I would like to know the approach to implement and register custom
>>>>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>>>>> functions like SUM, COUNT,etc
>>>>>>>
>>>>>>> Please help.
>>>>>>>
>>>>>>> Thanks
>>>>>>> Swapna
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
Yes, we do have support UPPER and LOWER. I just provided as an example to
refer to UDF.

For custom UDF's, i understand that we can go ahead and create custom UDF
jar.

but how do we register that function?

As per the blog, i found the below lines:

*Finally, we'll need to register our new function. For this, you'll need to
edit the ExpressionType enum and include your new built-in function.
There's room for improvement here to allow registration of user defined
functions outside of the phoenix jar. However, you'd need to be able to
ensure your class is available on the HBase server class path since this
will be executed on the server side at runtime.*

 Does that mean, to register my custom function, i should edit the
*ExpressionType
enum *exists in Phoenix and rebuild the *phoenix jar?*




On Thu, Mar 17, 2016 at 6:17 PM, James Taylor <ja...@apache.org>
wrote:

> No, custom UDFs can be added dynamically as described here:
> https://phoenix.apache.org/udf.html. No need to re-build Phoenix. It's
> just custom aggregates that would require rebuilding.
>
> FYI, we have support for UPPER and LOWER already.
>
> On Thu, Mar 17, 2016 at 6:09 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Thank you James for swift response.
>>
>> is the process (adding to phoenix-core and rebuild the jar)  remains the
>> same for custom UDF's as well  (like as for custom aggregate functions)?
>>
>> ex: we have UDF's like  UPPER, LOWER ,etc
>>
>> On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
>> wrote:
>>
>>> Hi Swapna,
>>> We don't support custom aggregate functions, only scalar functions
>>> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
>>> to phoenix-core and rebuild the jar. We're open to adding them to the code
>>> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
>>> NTH_VALUE made it in.
>>> Thanks,
>>> James
>>>
>>> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I found this in Phoenix UDF documentation:
>>>>
>>>>    - After compiling your code to a jar, you need to deploy the jar
>>>>    into the HDFS. It would be better to add the jar to HDFS folder configured
>>>>    for hbase.dynamic.jars.dir.
>>>>
>>>>
>>>> My question is, can that be any 'udf-user-specific' jar which need to
>>>> be copied to HDFS or would it need to register the function and update the
>>>> custom UDF classes inside phoenix-core.jar and rebuild the
>>>> 'phoenix-core.jar'
>>>>
>>>> Regards
>>>> Swapna
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi Swapna,
>>>>> We currently don't support custom aggregate UDF, and it looks like you
>>>>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>>>>> Would be great to capture your use case and requirements on the JIRA to
>>>>> make sure the functionality will meet your needs.
>>>>> Thanks,
>>>>> James
>>>>>
>>>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <talktoswapna@gmail.com
>>>>> > wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I would like to know the approach to implement and register custom
>>>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>>>> functions like SUM, COUNT,etc
>>>>>>
>>>>>> Please help.
>>>>>>
>>>>>> Thanks
>>>>>> Swapna
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
Yes, we do have support UPPER and LOWER. I just provided as an example to
refer to UDF.

For custom UDF's, i understand that we can go ahead and create custom UDF
jar.

but how do we register that function?

As per the blog, i found the below lines:

*Finally, we'll need to register our new function. For this, you'll need to
edit the ExpressionType enum and include your new built-in function.
There's room for improvement here to allow registration of user defined
functions outside of the phoenix jar. However, you'd need to be able to
ensure your class is available on the HBase server class path since this
will be executed on the server side at runtime.*

 Does that mean, to register my custom function, i should edit the
*ExpressionType
enum *exists in Phoenix and rebuild the *phoenix jar?*




On Thu, Mar 17, 2016 at 6:17 PM, James Taylor <ja...@apache.org>
wrote:

> No, custom UDFs can be added dynamically as described here:
> https://phoenix.apache.org/udf.html. No need to re-build Phoenix. It's
> just custom aggregates that would require rebuilding.
>
> FYI, we have support for UPPER and LOWER already.
>
> On Thu, Mar 17, 2016 at 6:09 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Thank you James for swift response.
>>
>> is the process (adding to phoenix-core and rebuild the jar)  remains the
>> same for custom UDF's as well  (like as for custom aggregate functions)?
>>
>> ex: we have UDF's like  UPPER, LOWER ,etc
>>
>> On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
>> wrote:
>>
>>> Hi Swapna,
>>> We don't support custom aggregate functions, only scalar functions
>>> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
>>> to phoenix-core and rebuild the jar. We're open to adding them to the code
>>> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
>>> NTH_VALUE made it in.
>>> Thanks,
>>> James
>>>
>>> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I found this in Phoenix UDF documentation:
>>>>
>>>>    - After compiling your code to a jar, you need to deploy the jar
>>>>    into the HDFS. It would be better to add the jar to HDFS folder configured
>>>>    for hbase.dynamic.jars.dir.
>>>>
>>>>
>>>> My question is, can that be any 'udf-user-specific' jar which need to
>>>> be copied to HDFS or would it need to register the function and update the
>>>> custom UDF classes inside phoenix-core.jar and rebuild the
>>>> 'phoenix-core.jar'
>>>>
>>>> Regards
>>>> Swapna
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>>>> wrote:
>>>>
>>>>> Hi Swapna,
>>>>> We currently don't support custom aggregate UDF, and it looks like you
>>>>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>>>>> Would be great to capture your use case and requirements on the JIRA to
>>>>> make sure the functionality will meet your needs.
>>>>> Thanks,
>>>>> James
>>>>>
>>>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <talktoswapna@gmail.com
>>>>> > wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I would like to know the approach to implement and register custom
>>>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>>>> functions like SUM, COUNT,etc
>>>>>>
>>>>>> Please help.
>>>>>>
>>>>>> Thanks
>>>>>> Swapna
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by James Taylor <ja...@apache.org>.
No, custom UDFs can be added dynamically as described here:
https://phoenix.apache.org/udf.html. No need to re-build Phoenix. It's just
custom aggregates that would require rebuilding.

FYI, we have support for UPPER and LOWER already.

On Thu, Mar 17, 2016 at 6:09 PM, Swapna Swapna <ta...@gmail.com>
wrote:

> Thank you James for swift response.
>
> is the process (adding to phoenix-core and rebuild the jar)  remains the
> same for custom UDF's as well  (like as for custom aggregate functions)?
>
> ex: we have UDF's like  UPPER, LOWER ,etc
>
> On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
> wrote:
>
>> Hi Swapna,
>> We don't support custom aggregate functions, only scalar functions
>> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
>> to phoenix-core and rebuild the jar. We're open to adding them to the code
>> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
>> NTH_VALUE made it in.
>> Thanks,
>> James
>>
>> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I found this in Phoenix UDF documentation:
>>>
>>>    - After compiling your code to a jar, you need to deploy the jar
>>>    into the HDFS. It would be better to add the jar to HDFS folder configured
>>>    for hbase.dynamic.jars.dir.
>>>
>>>
>>> My question is, can that be any 'udf-user-specific' jar which need to be
>>> copied to HDFS or would it need to register the function and update the
>>> custom UDF classes inside phoenix-core.jar and rebuild the
>>> 'phoenix-core.jar'
>>>
>>> Regards
>>> Swapna
>>>
>>>
>>>
>>>
>>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>>> wrote:
>>>
>>>> Hi Swapna,
>>>> We currently don't support custom aggregate UDF, and it looks like you
>>>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>>>> Would be great to capture your use case and requirements on the JIRA to
>>>> make sure the functionality will meet your needs.
>>>> Thanks,
>>>> James
>>>>
>>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I would like to know the approach to implement and register custom
>>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>>> functions like SUM, COUNT,etc
>>>>>
>>>>> Please help.
>>>>>
>>>>> Thanks
>>>>> Swapna
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by James Taylor <ja...@apache.org>.
No, custom UDFs can be added dynamically as described here:
https://phoenix.apache.org/udf.html. No need to re-build Phoenix. It's just
custom aggregates that would require rebuilding.

FYI, we have support for UPPER and LOWER already.

On Thu, Mar 17, 2016 at 6:09 PM, Swapna Swapna <ta...@gmail.com>
wrote:

> Thank you James for swift response.
>
> is the process (adding to phoenix-core and rebuild the jar)  remains the
> same for custom UDF's as well  (like as for custom aggregate functions)?
>
> ex: we have UDF's like  UPPER, LOWER ,etc
>
> On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
> wrote:
>
>> Hi Swapna,
>> We don't support custom aggregate functions, only scalar functions
>> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
>> to phoenix-core and rebuild the jar. We're open to adding them to the code
>> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
>> NTH_VALUE made it in.
>> Thanks,
>> James
>>
>> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I found this in Phoenix UDF documentation:
>>>
>>>    - After compiling your code to a jar, you need to deploy the jar
>>>    into the HDFS. It would be better to add the jar to HDFS folder configured
>>>    for hbase.dynamic.jars.dir.
>>>
>>>
>>> My question is, can that be any 'udf-user-specific' jar which need to be
>>> copied to HDFS or would it need to register the function and update the
>>> custom UDF classes inside phoenix-core.jar and rebuild the
>>> 'phoenix-core.jar'
>>>
>>> Regards
>>> Swapna
>>>
>>>
>>>
>>>
>>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>>> wrote:
>>>
>>>> Hi Swapna,
>>>> We currently don't support custom aggregate UDF, and it looks like you
>>>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>>>> Would be great to capture your use case and requirements on the JIRA to
>>>> make sure the functionality will meet your needs.
>>>> Thanks,
>>>> James
>>>>
>>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I would like to know the approach to implement and register custom
>>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>>> functions like SUM, COUNT,etc
>>>>>
>>>>> Please help.
>>>>>
>>>>> Thanks
>>>>> Swapna
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
Thank you James for swift response.

is the process (adding to phoenix-core and rebuild the jar)  remains the
same for custom UDF's as well  (like as for custom aggregate functions)?

ex: we have UDF's like  UPPER, LOWER ,etc

On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
wrote:

> Hi Swapna,
> We don't support custom aggregate functions, only scalar functions
> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
> to phoenix-core and rebuild the jar. We're open to adding them to the code
> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
> NTH_VALUE made it in.
> Thanks,
> James
>
> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I found this in Phoenix UDF documentation:
>>
>>    - After compiling your code to a jar, you need to deploy the jar into
>>    the HDFS. It would be better to add the jar to HDFS folder configured for
>>    hbase.dynamic.jars.dir.
>>
>>
>> My question is, can that be any 'udf-user-specific' jar which need to be
>> copied to HDFS or would it need to register the function and update the
>> custom UDF classes inside phoenix-core.jar and rebuild the
>> 'phoenix-core.jar'
>>
>> Regards
>> Swapna
>>
>>
>>
>>
>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>> wrote:
>>
>>> Hi Swapna,
>>> We currently don't support custom aggregate UDF, and it looks like you
>>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>>> Would be great to capture your use case and requirements on the JIRA to
>>> make sure the functionality will meet your needs.
>>> Thanks,
>>> James
>>>
>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to know the approach to implement and register custom
>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>> functions like SUM, COUNT,etc
>>>>
>>>> Please help.
>>>>
>>>> Thanks
>>>> Swapna
>>>>
>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
Thank you James for swift response.

is the process (adding to phoenix-core and rebuild the jar)  remains the
same for custom UDF's as well  (like as for custom aggregate functions)?

ex: we have UDF's like  UPPER, LOWER ,etc

On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
wrote:

> Hi Swapna,
> We don't support custom aggregate functions, only scalar functions
> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
> to phoenix-core and rebuild the jar. We're open to adding them to the code
> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
> NTH_VALUE made it in.
> Thanks,
> James
>
> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I found this in Phoenix UDF documentation:
>>
>>    - After compiling your code to a jar, you need to deploy the jar into
>>    the HDFS. It would be better to add the jar to HDFS folder configured for
>>    hbase.dynamic.jars.dir.
>>
>>
>> My question is, can that be any 'udf-user-specific' jar which need to be
>> copied to HDFS or would it need to register the function and update the
>> custom UDF classes inside phoenix-core.jar and rebuild the
>> 'phoenix-core.jar'
>>
>> Regards
>> Swapna
>>
>>
>>
>>
>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>> wrote:
>>
>>> Hi Swapna,
>>> We currently don't support custom aggregate UDF, and it looks like you
>>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>>> Would be great to capture your use case and requirements on the JIRA to
>>> make sure the functionality will meet your needs.
>>> Thanks,
>>> James
>>>
>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to know the approach to implement and register custom
>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>> functions like SUM, COUNT,etc
>>>>
>>>> Please help.
>>>>
>>>> Thanks
>>>> Swapna
>>>>
>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Akhil <ak...@gmail.com>.
Hi Swapna,

I happen to run into same issue and have written a custom aggregate UDF and
successfully compiled phoenix-core and full phoenix project too. But after
replacing phoenix-client, phoenix-server and phoenix-core jar I still get
following error- 
Error: ERROR 6001 (42F01): Function undefined.
functionName=[GENERIC_AGG_FUNCTION] not found (state=42F01,code=6001)

What all jars do we need to replace? Please help.



--
View this message in context: http://apache-phoenix-user-list.1124778.n5.nabble.com/Implement-Custom-Aggregate-Functions-in-Phoenix-tp999p2645.html
Sent from the Apache Phoenix User List mailing list archive at Nabble.com.

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Andrea_julianos <An...@outlook.com>.
Hi friend,are you fixed this problem? 
I have some problem when I simulate sumAggregateFunction, I call it 
ZSumAggregateFunction, also, I add some class such ZDecimalAggregator, 
ZSumAggregateParseNode, and anyone were related with SumAggregateFunction.
so now, I can't find what place will aggregate every row's value, In 
ZDecialAggregator's function--Aggregate(), It's just run one time, and the 
value is final result 
can you help me, please, I have no idea. 
thank you!!! 



--
Sent from: http://apache-phoenix-user-list.1124778.n5.nabble.com/

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
HI James/Team,

1. I'm trying to implement the generic (custom) aggregate function and
using verison:  *phoenix-4.6.0-HBase-0.98 *with single-node (having hbase
and phoenix exists in one node)

When i downloaded and installed, noticed that SumAggregateFunction.class
exists in all the below mentioned jars as per bin folder :

-  phoenix-4.6.0-HBase-0.98-client.jar

-  phoenix-4.6.0-HBase-0.98-client-minimal.jar

-  phoenix-4.6.0-HBase-0.98-client-without-hbase.jar

-  phoenix-4.6.0-HBase-0.98-server.jar

-  phoenix-4.6.0-HBase-0.98-server-without-antlr.jar

-  phoenix-core-4.6.0-HBase-0.98.jar

-  phoenix-server-4.6.0-HBase-0.98-runnable.jar

But as the per the source code base , *phoenix-4.6.0-HBase-0.98-src*,
aggregate source files exists in only '*phoenix-core'* module. Please
clarify.


2. As i found the aggregate source code functions exists in only
phoenix-core' module, i've implemented the custom aggregate function and
rebuild the jar '*phoenix-core-4.6.0-HBase-0.98.jar'* , copied to hbase lib
directory in the master/region server and restarted hbase.

3. When im trying the execute the Phoenix query through sqlline, im
gettting the below error. This could be because I've not updated the client
jar with my new function.

*Error: ERROR 6001 (42F01): Function undefined. functionName=[mytest]
(state=42F01,code=6001)*org.apache.phoenix.schema.FunctionNotFoundException:
ERROR 6001 (42F01): Function undefined. functionName=[mytest]

Kindly help me to know the list of jar's to be modified when implementing
custom aggregate functions.




On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
wrote:

> Hi Swapna,
> We don't support custom aggregate functions, only scalar functions
> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
> to phoenix-core and rebuild the jar. We're open to adding them to the code
> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
> NTH_VALUE made it in.
> Thanks,
> James
>
> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I found this in Phoenix UDF documentation:
>>
>>    - After compiling your code to a jar, you need to deploy the jar into
>>    the HDFS. It would be better to add the jar to HDFS folder configured for
>>    hbase.dynamic.jars.dir.
>>
>>
>> My question is, can that be any 'udf-user-specific' jar which need to be
>> copied to HDFS or would it need to register the function and update the
>> custom UDF classes inside phoenix-core.jar and rebuild the
>> 'phoenix-core.jar'
>>
>> Regards
>> Swapna
>>
>>
>>
>>
>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>> wrote:
>>
>>> Hi Swapna,
>>> We currently don't support custom aggregate UDF, and it looks like you
>>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>>> Would be great to capture your use case and requirements on the JIRA to
>>> make sure the functionality will meet your needs.
>>> Thanks,
>>> James
>>>
>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to know the approach to implement and register custom
>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>> functions like SUM, COUNT,etc
>>>>
>>>> Please help.
>>>>
>>>> Thanks
>>>> Swapna
>>>>
>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
HI James/Team,

1. I'm trying to implement the generic (custom) aggregate function and
using verison:  *phoenix-4.6.0-HBase-0.98 *with single-node (having hbase
and phoenix exists in one node)

When i downloaded and installed, noticed that SumAggregateFunction.class
exists in all the below mentioned jars as per bin folder :

-  phoenix-4.6.0-HBase-0.98-client.jar

-  phoenix-4.6.0-HBase-0.98-client-minimal.jar

-  phoenix-4.6.0-HBase-0.98-client-without-hbase.jar

-  phoenix-4.6.0-HBase-0.98-server.jar

-  phoenix-4.6.0-HBase-0.98-server-without-antlr.jar

-  phoenix-core-4.6.0-HBase-0.98.jar

-  phoenix-server-4.6.0-HBase-0.98-runnable.jar

But as the per the source code base , *phoenix-4.6.0-HBase-0.98-src*,
aggregate source files exists in only '*phoenix-core'* module. Please
clarify.


2. As i found the aggregate source code functions exists in only
phoenix-core' module, i've implemented the custom aggregate function and
rebuild the jar '*phoenix-core-4.6.0-HBase-0.98.jar'* , copied to hbase lib
directory in the master/region server and restarted hbase.

3. When im trying the execute the Phoenix query through sqlline, im
gettting the below error. This could be because I've not updated the client
jar with my new function.

*Error: ERROR 6001 (42F01): Function undefined. functionName=[mytest]
(state=42F01,code=6001)*org.apache.phoenix.schema.FunctionNotFoundException:
ERROR 6001 (42F01): Function undefined. functionName=[mytest]

Kindly help me to know the list of jar's to be modified when implementing
custom aggregate functions.




On Thu, Mar 17, 2016 at 5:53 PM, James Taylor <ja...@apache.org>
wrote:

> Hi Swapna,
> We don't support custom aggregate functions, only scalar functions
> (see PHOENIX-2069). For a custom aggregate function, you'd need to add them
> to phoenix-core and rebuild the jar. We're open to adding them to the code
> base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
> NTH_VALUE made it in.
> Thanks,
> James
>
> On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I found this in Phoenix UDF documentation:
>>
>>    - After compiling your code to a jar, you need to deploy the jar into
>>    the HDFS. It would be better to add the jar to HDFS folder configured for
>>    hbase.dynamic.jars.dir.
>>
>>
>> My question is, can that be any 'udf-user-specific' jar which need to be
>> copied to HDFS or would it need to register the function and update the
>> custom UDF classes inside phoenix-core.jar and rebuild the
>> 'phoenix-core.jar'
>>
>> Regards
>> Swapna
>>
>>
>>
>>
>> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
>> wrote:
>>
>>> Hi Swapna,
>>> We currently don't support custom aggregate UDF, and it looks like you
>>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>>> Would be great to capture your use case and requirements on the JIRA to
>>> make sure the functionality will meet your needs.
>>> Thanks,
>>> James
>>>
>>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to know the approach to implement and register custom
>>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>>> functions like SUM, COUNT,etc
>>>>
>>>> Please help.
>>>>
>>>> Thanks
>>>> Swapna
>>>>
>>>
>>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by James Taylor <ja...@apache.org>.
Hi Swapna,
We don't support custom aggregate functions, only scalar functions
(see PHOENIX-2069). For a custom aggregate function, you'd need to add them
to phoenix-core and rebuild the jar. We're open to adding them to the code
base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
NTH_VALUE made it in.
Thanks,
James

On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
wrote:

> Hi,
>
> I found this in Phoenix UDF documentation:
>
>    - After compiling your code to a jar, you need to deploy the jar into
>    the HDFS. It would be better to add the jar to HDFS folder configured for
>    hbase.dynamic.jars.dir.
>
>
> My question is, can that be any 'udf-user-specific' jar which need to be
> copied to HDFS or would it need to register the function and update the
> custom UDF classes inside phoenix-core.jar and rebuild the
> 'phoenix-core.jar'
>
> Regards
> Swapna
>
>
>
>
> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
> wrote:
>
>> Hi Swapna,
>> We currently don't support custom aggregate UDF, and it looks like you
>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>> Would be great to capture your use case and requirements on the JIRA to
>> make sure the functionality will meet your needs.
>> Thanks,
>> James
>>
>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I would like to know the approach to implement and register custom
>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>> functions like SUM, COUNT,etc
>>>
>>> Please help.
>>>
>>> Thanks
>>> Swapna
>>>
>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by James Taylor <ja...@apache.org>.
Hi Swapna,
We don't support custom aggregate functions, only scalar functions
(see PHOENIX-2069). For a custom aggregate function, you'd need to add them
to phoenix-core and rebuild the jar. We're open to adding them to the code
base if they're general enough. That's how FIRST_VALUE, LAST_VALUE, and
NTH_VALUE made it in.
Thanks,
James

On Thu, Mar 17, 2016 at 12:11 PM, Swapna Swapna <ta...@gmail.com>
wrote:

> Hi,
>
> I found this in Phoenix UDF documentation:
>
>    - After compiling your code to a jar, you need to deploy the jar into
>    the HDFS. It would be better to add the jar to HDFS folder configured for
>    hbase.dynamic.jars.dir.
>
>
> My question is, can that be any 'udf-user-specific' jar which need to be
> copied to HDFS or would it need to register the function and update the
> custom UDF classes inside phoenix-core.jar and rebuild the
> 'phoenix-core.jar'
>
> Regards
> Swapna
>
>
>
>
> On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
> wrote:
>
>> Hi Swapna,
>> We currently don't support custom aggregate UDF, and it looks like you
>> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
>> Would be great to capture your use case and requirements on the JIRA to
>> make sure the functionality will meet your needs.
>> Thanks,
>> James
>>
>> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I would like to know the approach to implement and register custom
>>> aggregate functions in Phoenix like the way we have built-in aggregate
>>> functions like SUM, COUNT,etc
>>>
>>> Please help.
>>>
>>> Thanks
>>> Swapna
>>>
>>
>>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
Hi,

I found this in Phoenix UDF documentation:

   - After compiling your code to a jar, you need to deploy the jar into
   the HDFS. It would be better to add the jar to HDFS folder configured for
   hbase.dynamic.jars.dir.


My question is, can that be any 'udf-user-specific' jar which need to be
copied to HDFS or would it need to register the function and update the
custom UDF classes inside phoenix-core.jar and rebuild the
'phoenix-core.jar'

Regards
Swapna




On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
wrote:

> Hi Swapna,
> We currently don't support custom aggregate UDF, and it looks like you
> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
> Would be great to capture your use case and requirements on the JIRA to
> make sure the functionality will meet your needs.
> Thanks,
> James
>
> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I would like to know the approach to implement and register custom
>> aggregate functions in Phoenix like the way we have built-in aggregate
>> functions like SUM, COUNT,etc
>>
>> Please help.
>>
>> Thanks
>> Swapna
>>
>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by Swapna Swapna <ta...@gmail.com>.
Hi,

I found this in Phoenix UDF documentation:

   - After compiling your code to a jar, you need to deploy the jar into
   the HDFS. It would be better to add the jar to HDFS folder configured for
   hbase.dynamic.jars.dir.


My question is, can that be any 'udf-user-specific' jar which need to be
copied to HDFS or would it need to register the function and update the
custom UDF classes inside phoenix-core.jar and rebuild the
'phoenix-core.jar'

Regards
Swapna




On Fri, Jan 29, 2016 at 6:31 PM, James Taylor <ja...@apache.org>
wrote:

> Hi Swapna,
> We currently don't support custom aggregate UDF, and it looks like you
> found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
> Would be great to capture your use case and requirements on the JIRA to
> make sure the functionality will meet your needs.
> Thanks,
> James
>
> On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I would like to know the approach to implement and register custom
>> aggregate functions in Phoenix like the way we have built-in aggregate
>> functions like SUM, COUNT,etc
>>
>> Please help.
>>
>> Thanks
>> Swapna
>>
>
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by James Taylor <ja...@apache.org>.
Hi Swapna,
We currently don't support custom aggregate UDF, and it looks like you
found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
Would be great to capture your use case and requirements on the JIRA to
make sure the functionality will meet your needs.
Thanks,
James

On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
wrote:

> Hi,
>
> I would like to know the approach to implement and register custom
> aggregate functions in Phoenix like the way we have built-in aggregate
> functions like SUM, COUNT,etc
>
> Please help.
>
> Thanks
> Swapna
>

Re: Implement Custom Aggregate Functions in Phoenix

Posted by James Taylor <ja...@apache.org>.
Hi Swapna,
We currently don't support custom aggregate UDF, and it looks like you
found the JIRA here: PHOENIX-2069. It would be a natural extension of UDFs.
Would be great to capture your use case and requirements on the JIRA to
make sure the functionality will meet your needs.
Thanks,
James

On Fri, Jan 29, 2016 at 1:47 PM, Swapna Swapna <ta...@gmail.com>
wrote:

> Hi,
>
> I would like to know the approach to implement and register custom
> aggregate functions in Phoenix like the way we have built-in aggregate
> functions like SUM, COUNT,etc
>
> Please help.
>
> Thanks
> Swapna
>