You should be able to declare your parameter as VARBINARY and you can then use any type.

On Tue, Mar 5, 2019 at 5:56 PM OMKAR NALAWADE <nalawadeomkar73@gmail.com> wrote:
Hello,

I am trying to access cell level timestamp of a given column in a table using a phoenix UDF.
For example: I have created a UDF named TS_UDF(dataType) 
When we register the function using
CREATE FUNCTION TS_UDF(BOOLEAN) RETURNS BIGINT as 'com.mypackage.TsFunction.' using jar 'hdfs:/localhost:8080/hbase/lib/myjar.jar';

In the above statement, I wish to pass a generic datatype to the TS_UDF function instead of Boolean datatype so that it can be used for the columns with any datatype.

Is there a way we can create a function and pass a generic datatype in Phoenix?

I am using HDP 2.6.4 stack with HBase version 1.1.2 and Phoenix version 4.7.0

Regards,

Omkar


On Tue, Mar 5, 2019 at 4:57 PM OMKAR NALAWADE <nalawadeomkar73@gmail.com> wrote:

Hello,
I am trying to access cell level timestamp of a given column in a table using a phoenix UDF.
For example: I have created a UDF named TS_UDF(dataType) 
When we register the function using
CREATE FUNCTION TS_UDF(BOOLEAN) RETURNS BIGINT as 'com.mypackage.TsFunction.' using jar 'hdfs:/localhost:8080/hbase/lib/myjar.jar';

In the above statement, I wish to pass a generic datatype to the TS_UDF function instead of Boolean datatype so that it can be used for the columns with any datatype.

Is there a way we can create a function and pass a generic datatype in Phoenix?

I am using HDP 2.6.4 stack with HBase version 1.1.2 and Phoenix version 4.7.0

Regards,

Omkar