Sure thing. I'll get on it.
t;>> VarCharHolder out;
>>>>
>>>> @Inject
>>>>
>>>> DrillBuf buffer;
>>>>
>>>> HashFunction hashFunction;
>>>>
>>>> public void setup() {
>>>>
>>>> hashFunctio
ublic void eval() {
>> >
>> >String stringValue =
>> > org.apache.drill.exec.expr.fn.impl.StringFunctionHelpers.toS
>> tringFromUTF8(
>> > input.start, input.end, input.buffer);
>> >
>> >HashCode hashCode = hashFunction.hashString(
tValue = hashCode.toString();
>
> // put the output value in the out buffer
>
> out.buffer = buffer;
>
> out.start = 0;
>
> out.end = outputValue.getBytes().length;
>
> buffer.setBytes(0, outputValue.getBytes());
>
> }
>
>
nHelpers.
> toStringFromUTF8(
> > input.start, input.end, input.buffer);
> >
> >HashCode hashCode = hashFunction.hashString(stringValue,
> > StandardCharsets.UTF_8);//hashFunction.hashString(stringValue);
> >
> >String outputValue = hashCode.toString();
> >
;
> >
> >HashCode hashCode = hashFunction.hashString(stringValue,
> > StandardCharsets.UTF_8);//hashFunction.hashString(stringValue);
> >
> >String outputValue = hashCode.toString();
> >
> >// put the output value in the out buffer
> >
> >ou
alue.getBytes().length;
>
>buffer.setBytes(0, outputValue.getBytes());
>
>}
>
> }
>
>
>
> On Wed, Nov 9, 2016 at 11:09 AM, Arina Yelchiyeva <
> arina.yelchiy...@gmail.com> wrote:
>
>> Hi Joseph,
>>
>> custom functions work sh
put value in the out buffer
out.buffer = buffer;
out.start = 0;
out.end = outputValue.getBytes().length;
buffer.setBytes(0, outputValue.getBytes());
}
}
On Wed, Nov 9, 2016 at 11:09 AM, Arina Yelchiyeva <
arina.yelchiy...@gmail.com> wrote:
> Hi
Hi Joseph,
custom functions work should work fine in 1.8. At least I am not aware of
any issues.
Can you specify what problems with custom UDFs do you have?
Kind regards
Arina
On Wed, Nov 9, 2016 at 6:02 PM, Joseph Swingle wrote:
> Drill team,
>
> Are Custom Functions simply broke i
Drill team,
Are Custom Functions simply broke in Version 1.8?
Any movement on DRILL-4776 would be appreciated.
Heck, willing to even fix all the doc, provided someone can provide me a
Custom Function that works in 1.8.
https://issues.apache.org/jira/browse/DRILL-4776
Hey Ted, so I hit the end road. I figured out the compilation issues but
then now I am getting run time issues when I am trying to open a jdbc
connection from within the UDF. I have made some modification to your
simpleAdd UDF. Attached is the src code of the file .
The example is very silly - just
yes. You can do this.
It doesn't make sense to do so, but you can. This might not be a good
example for playing with UDF's since it is going to get you some confusing
answers.
On Wed, Jul 1, 2015 at 12:15 PM, Alok Tanna wrote:
> I am trying to look further into UDF, write more complex UDF u
If the general idea of what you are trying to accomplish with this function
is not private, it might be useful to ask about your use case more
generally. Although we are still working to integrate the JDBC plugin into
the Drill mainline and it still requires a thorough testing cycle, this
might be
A UDF is just code, so you are going to make it do pretty much anything you
want.
What is advisable is different than what is capable. A function that
requires a database to work is a tough one though. You would have to bake
in special functionality or hard code to find the configuration to connec
I am trying to look further into UDF, write more complex UDF using which we
call out a JDBC source in UDF .
Thanks,
Alok Tanna
---
On Wed, Jul 1, 2015 at 11:30 AM, Jim Scott wrote:
> I am curious to understand the reason you want a UDF to call out to a JDBC
> source.
>
> You can call a JDBC so
I am curious to understand the reason you want a UDF to call out to a JDBC
source.
You can call a JDBC source directly from within Drill which makes it so
that you can query a JDBC source and join it to other sources just like the
DFS.
On Wed, Jul 1, 2015 at 9:58 AM, Alok Tanna wrote:
> Ted\ V
Ted\ Vince,
Can you help me with below quick question related to UDF .
1. Can I call a jdbc from within a UDF ?
2. Can we have JDBC UDF work with embedded Drill Install without cluster
mode & zookeeper .
referring to
https://github.com/vicenteg/DrillJDBCExample/blob/master/src/main/java/com/mapr/d
Thanks. Very interesting input.
On Mon, Jun 29, 2015 at 2:09 PM, Alok Tanna wrote:
> Maven 3.3.3 -- Latest version , it worked with 3.0.5
>
> On Mon, Jun 29, 2015 at 4:23 PM, Ted Dunning
> wrote:
>
> > On Mon, Jun 29, 2015 at 1:03 PM, Alok Tanna
> > wrote:
> >
> > > I was using latest version
Maven 3.3.3 -- Latest version , it worked with 3.0.5
On Mon, Jun 29, 2015 at 4:23 PM, Ted Dunning wrote:
> On Mon, Jun 29, 2015 at 1:03 PM, Alok Tanna
> wrote:
>
> > I was using latest version of Maven , guess that
> > was the issue.
> >
>
> What was the version?
>
On Mon, Jun 29, 2015 at 1:03 PM, Alok Tanna wrote:
> I was using latest version of Maven , guess that
> was the issue.
>
What was the version?
> > >
> > > > Try using the JDK.
> > > >
> > > > Also, here's a POM:
> > > > https://github.com/vicenteg/DrillJDBCExample/blob/master/pom.xml
> > > >
> > > > On Wed, Jun 24, 2015 at 2:10 PM, Alok Tanna >
> > > > wro
provided in this environment. Perhaps you are
> > > > running on a JRE rather than a JDK?
> > > > [INFO] 1 error
> > > > [INFO] -
> > > > [INFO]
> > > >
compile) on project simple-drill-function: Compilation failure
> > > [ERROR] No compiler is provided in this environment. Perhaps you are
> > > running on a JRE rather than a JDK?
> > > [ERROR] -> [Help 1]
> > > [ERROR]
> > > [ERROR] To see
; (default-compile) on project simple-drill-function: Compilation
>> failure
>> > > [ERROR] No compiler is provided in this environment. Perhaps you are
>> > > running on a JRE rather than a JDK?
>> > > [ERROR] -> [Help 1]
>> > >
ven-compiler-plugin:3.0:compile
> > > (default-compile) on project simple-drill-function: Compilation failure
> > > [ERROR] No compiler is provided in this environment. Perhaps you are
> > > running on a JRE rather than a JDK?
> > > [ERROR] -> [Help 1]
> >
;> one of the arguments as well.
> > >> >>
> > >> >> The issues with this approach are:
> > >> >>
> > >> >> 1) kinda ugly because you aren't calling your code directly
> > >> >>
> > >> >> 2) Jython isn't quite Python
> > >> >>
> > >> >> I have no idea how to do it specifically, but it is plausible that
> > you
> > >> >> could build something that automatically generates the interlude
> > >> function
> > >> >> for you in Java that calls your Python code. Python annotations
> might
> > >> be
> > >> >> the cat's pajamas for this. Or not. Hard to say.
> > >> >>
> > >> >> The Java API that Drill provides is not a traditional API in the
> > normal
> > >> >> sense of the word because Drill actually snarfs the source code and
> > >> >> inlines
> > >> >> it into Drill-generated code. It wouldn't understand your Python
> > code
> > >> at
> > >> >> all.
> > >> >>
> > >> >> It might be possible to teach Drill how to understand how to
> > transform
> > >> >> Python UDF's directly into something that Drill could use, but that
> > >> would
> > >> >> definitely be a bit ambitious.
> > >> >>
> > >> >> How utterly clean an interface do you need?
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> On Tue, Jun 23, 2015 at 10:10 PM, Alok Tanna <
> > ata...@exertdigital.com>
> > >> >> wrote:
> > >> >>
> > >> >> > Can we create Custom Functions using Python in Drill ?
> > >> >> >
> > >> >> > I do understand Drill provides a high performance Java API with
> > >> >> interfaces
> > >> >> > so that we can implement to develop simple and aggregate custom
> > >> >> functions.
> > >> >> >
> > >> >> > Thanks,
> > >> >> > Alok Tanna
> > >> >> >
> > >> >>
> > >> >
> > >> >
> > >>
> > >
> > >
> >
>
enerates the interlude
> > > function
> > > >> for you in Java that calls your Python code. Python annotations
> might
> > be
> > > >> the cat's pajamas for this. Or not. Hard to say.
> > > >>
> > > >> The Java API that Drill provides is not a traditional API in the
> > normal
> > > >> sense of the word because Drill actually snarfs the source code and
> > > >> inlines
> > > >> it into Drill-generated code. It wouldn't understand your Python
> code
> > > at
> > > >> all.
> > > >>
> > > >> It might be possible to teach Drill how to understand how to
> transform
> > > >> Python UDF's directly into something that Drill could use, but that
> > > would
> > > >> definitely be a bit ambitious.
> > > >>
> > > >> How utterly clean an interface do you need?
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >> On Tue, Jun 23, 2015 at 10:10 PM, Alok Tanna <
> ata...@exertdigital.com
> > >
> > > >> wrote:
> > > >>
> > > >> > Can we create Custom Functions using Python in Drill ?
> > > >> >
> > > >> > I do understand Drill provides a high performance Java API with
> > > >> interfaces
> > > >> > so that we can implement to develop simple and aggregate custom
> > > >> functions.
> > > >> >
> > > >> > Thanks,
> > > >> > Alok Tanna
> > > >> >
> > > >>
> > > >
> > > >
> > >
> >
>
ven using the -X switch to enable full debug logging.
>
>
> Thanks,
> Alok Tanna
>
> -- Forwarded message --
> From: Alok Tanna
> Date: Wed, Jun 24, 2015 at 1:16 PM
> Subject: Re: Custom Functions
> To: user@drill.apache.org
>
>
> Vince, If possible ca
bug logging.
Thanks,
Alok Tanna
-- Forwarded message --
From: Alok Tanna
Date: Wed, Jun 24, 2015 at 1:16 PM
Subject: Re: Custom Functions
To: user@drill.apache.org
Vince, If possible can you share your POM.xml file .
On Wed, Jun 24, 2015 at 1:16 PM, Alok Tanna wrote:
> Vin
gt;> inlines
> >> it into Drill-generated code. It wouldn't understand your Python code
> at
> >> all.
> >>
> >> It might be possible to teach Drill how to understand how to transform
> >> Python UDF's directly into something that Drill could use, but that
> would
> >> definitely be a bit ambitious.
> >>
> >> How utterly clean an interface do you need?
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Tue, Jun 23, 2015 at 10:10 PM, Alok Tanna
> >> wrote:
> >>
> >> > Can we create Custom Functions using Python in Drill ?
> >> >
> >> > I do understand Drill provides a high performance Java API with
> >> interfaces
> >> > so that we can implement to develop simple and aggregate custom
> >> functions.
> >> >
> >> > Thanks,
> >> > Alok Tanna
> >> >
> >>
> >
> >
>
rates the interlude
> > function
> > >> for you in Java that calls your Python code. Python annotations might
> be
> > >> the cat's pajamas for this. Or not. Hard to say.
> > >>
> > >> The Java API that Drill provides is not a traditional API in
d because Drill actually snarfs the source code and
> >> inlines
> >> it into Drill-generated code. It wouldn't understand your Python code
> at
> >> all.
> >>
> >> It might be possible to teach Drill how to understand how to transform
ble to teach Drill how to understand how to transform
>> Python UDF's directly into something that Drill could use, but that would
>> definitely be a bit ambitious.
>>
>> How utterly clean an interface do you need?
>>
>>
>>
>>
>>
>>
>> On Tue, Jun 23, 2015 at 10:10 PM, Alok Tanna
>> wrote:
>>
>> > Can we create Custom Functions using Python in Drill ?
>> >
>> > I do understand Drill provides a high performance Java API with
>> interfaces
>> > so that we can implement to develop simple and aggregate custom
>> functions.
>> >
>> > Thanks,
>> > Alok Tanna
>> >
>>
>
>
w to understand how to transform
> Python UDF's directly into something that Drill could use, but that would
> definitely be a bit ambitious.
>
> How utterly clean an interface do you need?
>
>
>
>
>
>
> On Tue, Jun 23, 2015 at 10:10 PM, Alok Tanna
> wrote:
to transform
Python UDF's directly into something that Drill could use, but that would
definitely be a bit ambitious.
How utterly clean an interface do you need?
On Tue, Jun 23, 2015 at 10:10 PM, Alok Tanna
wrote:
> Can we create Custom Functions using Python in Drill ?
>
> I d
Can we create Custom Functions using Python in Drill ?
I do understand Drill provides a high performance Java API with interfaces
so that we can implement to develop simple and aggregate custom functions.
--
Thanks & Regards,
Alok R. Tanna
Can we create Custom Functions using Python in Drill ?
I do understand Drill provides a high performance Java API with interfaces
so that we can implement to develop simple and aggregate custom functions.
Thanks,
Alok Tanna
.
>
>
> On Sun, Mar 15, 2015 at 3:07 PM, Haofeng Tang wrote:
>
> > I was able to follow the custom function articles to create new
> functions.
> >
> > However, when I tried to create my own test custom functions, where some
> > 3rd party libraries are needed, I
to follow the custom function articles to create new functions.
>
> However, when I tried to create my own test custom functions, where some
> 3rd party libraries are needed, I wasn't able to get it to work. Here's my
> test:
>
> -- Created class "MyClass"
I was able to follow the custom function articles to create new functions.
However, when I tried to create my own test custom functions, where some
3rd party libraries are needed, I wasn't able to get it to work. Here's my
test:
-- Created class "MyClass" in drill-java-
40 matches
Mail list logo