Thanks Charles, euclidean distance <https://en.wikipedia.org/wiki/Euclidean_distance> or l2 norm, but to be clear my column is a list of floats and the calculation needs to be between two lists. It's the list of floats bit that seems to be causing me trouble.
Mike On Tue, Jun 27, 2017 at 4:52 PM, Charles Givre <[email protected]> wrote: > Mike, > 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 <[email protected]> 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 > >
