drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Givre <cgi...@gmail.com>
Subject Re: euclidean distance user defined function
Date Tue, 27 Jun 2017 23:52:51 GMT
What distance function are you looking to implement.  I actually have a bunch of these done
and can push them to github.
— C
> On Jun 27, 2017, at 19:20, Mike Smoot <mike.smoot@gmail.com> wrote:
> Hello,
> I've got some JSON files where each record contains a list of floats as one
> column.  I'd like to write a custom function that given a query list of
> floats will then calculate the euclidean (l2) distance between my query
> list and each list in the table.  I've gotten the example custom function
> <https://github.com/tgrall/drill-simple-mask-function> working and I've got
> my own function set up, but I'm unclear about which classes I should be
> using to represent the input parameters.  Given some of the errors I've
> seen while querying my json file I'm guessing that drill thinks the column
> type is ANY.
> Can anyone provide guidance on which class I should use for my input param:
>    @Param
>    ???? input;
> And once the input is defined, how I should access the list of floats from
> said input?
> thanks,
> Mike

View raw message