drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krishnanand Khambadkone <kkhambadk...@yahoo.com.INVALID>
Subject Re: RepeatedMapHolder
Date Tue, 29 Jan 2019 21:01:30 GMT
 Hi Charles,  I have a query that sends  a kvgen output to my UDF called MyUDF  like this,
select  MyUDF(kvgen(convert_fromJSON(max(s.spark_event))['Spark Properties']))
In my UDF java code, I have defined the input parameter thus,

@Param
RepeatedMapHolder input;
How do I dereference this variable,  I am using this line,   It is throwing an exception,

RepeatedMapHolder inputValue  =  org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toStringFromUTF8(input.start,
input.end, input.buffer);

    On Tuesday, January 29, 2019, 8:52:16 AM PST, Charles Givre <cgivre@gmail.com> wrote:
 
 
 This message is eligible for Automatic Cleanup! (cgivre@gmail.com) Add cleanup rule | More
info
 Hi there, 
Can you please either share your code, or provide us with more details with what you are trying
to do with your UDF?
Thanks,
— C

> On Jan 29, 2019, at 11:21, Krishnanand Khambadkone <kkhambadkone@yahoo.com.INVALID>
wrote:
> 
> Hi,  Are there any examples of how to use RepeatedMapHolder in a drill custom UDF. 
I am sending a kvgen string to a custom udf.
  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message