Hi Jim, My UDF is currently so simple that I'm not sure you need it (or want it).
It basically just rounds a timestamp value with ISO 8601 periods asRoundTimestamp(timestampvalue,'PT10M'). I would be more than happy to contribute to your project rather than building our own :). Is the repo public? Regards, -Stefan On Sun, Jul 19, 2015 at 6:18 PM, Jim Bates <[email protected]> wrote: > Maven will typically create a jar for class and a jar for source when told > to do so. I just include the source files in the same jar as the class > files. There is a github example drill udf project we are working on to > include several examples to simplify the learning curve. If your > interested... I'd love to have you add your udf. > On Jul 19, 2015 12:59 PM, "Stefán Baxter" <[email protected]> > wrote: > > > Hi again, > > > > Going over the documentation once more I came across this: > > > > - Add the sources and classes JAR files to Drill’s classpath. > > > > I'm only including a standard .jar (with classes no sources) and I wonder > > why this dependency is listed. > > > > Anyways, that it the next step. > > > > A sample .jar that works with the drill-config counterpart would be a > > welcome addition to the documentation. > > > > Regards, > > -Stefan > > > > > > On Sun, Jul 19, 2015 at 5:53 PM, Stefán Baxter < > [email protected]> > > wrote: > > > > > Hi Jim, > > > > > > Now I have added the file to the jar (both root and resources folder) > but > > > that does not seem to change anything. > > > > > > Any additional ideas? > > > > > > Regards, > > > -Stefan > > > > > > On Sun, Jul 19, 2015 at 5:40 PM, Stefán Baxter < > > [email protected]> > > > wrote: > > > > > >> NO! > > >> > > >> Thank you , will do that right now :) > > >> > > >> On Sun, Jul 19, 2015 at 5:38 PM, Jim Bates <[email protected]> > wrote: > > >> > > >>> Did you include a file drill-module.conf in your jar along with > source > > >>> files? > > >>> On Jul 19, 2015 12:20 PM, "Stefán Baxter" <[email protected] > > > > >>> wrote: > > >>> > > >>> > Hi, > > >>> > > > >>> > I'm trying to deploy a UDF that I have written according to the > > >>> > documentation. > > >>> > > > >>> > I have also: > > >>> > > > >>> > 1. Copied the jar file > > >>> > to jars/3rdparty > > >>> > > > >>> > 2. Changed the config "conf/drill-override.conf" to include: > > >>> > drill.logical.function.package += > > >>> > > > >>> > ["org.apache.drill.exec.expr.fn.impl","com.activitystream.drill.udfs"] > > >>> > > > >>> > 3. Rerun the Drillbit > > >>> > bin/drillbit.sh start > > >>> > > > >>> > The log shows no sign of the the UDF being loaded but if I use it > in > > a > > >>> SQL > > >>> > statement then this error is thrown: > > >>> > > > >>> > Error: PARSE ERROR: From line 1, column 184 to line 1, column 219: > No > > >>> match > > >>> > found for function signature asRoundTimeStamp(<ANY>, <CHARACTER>) > > >>> > > > >>> > > > >>> > The relevant part of the UDF source: > > >>> > > > >>> > package com.activitystream.drill.udfs; > > >>> > > > >>> > public class ASUserDefinedFunctions { > > >>> > > > >>> > @FunctionTemplate(name = "asRoundTimeStamp", scope = > > >>> > FunctionTemplate.FunctionScope.SIMPLE, nulls = > > >>> > FunctionTemplate.NullHandling.NULL_IF_NULL) > > >>> > > > >>> > public static class RoundTimeStamp implements DrillSimpleFunc > > >>> > > > >>> > > > >>> > Can anyone please assist? > > >>> > > > >>> > Regards, > > >>> > -Stefan > > >>> > > > >>> > > >> > > >> > > > > > >
