-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create UDF with optional 2nd argument #85
Comments
You could create two constructors. One constructor has one argument and the other constructor has two arguments. |
I've tried that. There are two problems:
Hmmm I'll try again. Neither of those should block me. On Sun, Jan 5, 2014 at 12:12 PM, Matt Hayes notifications@github.comwrote:
Russell Jurney twitter.com/rjurney russell.jurney@gmail.com datasyndrome.com |
Oh I misunderstood I think. I thought you meant the constructor. Are you using SimpleEvalFunc? I don't think it supports this use case of a 2nd optional argument. If you look in the implementation of exec() you see this
It expects there to be a call() method and it checks that the input tuple has the same number of values as there are arguments in the call() method. I suggest just using EvalFunc then if you want optional parameters. |
I thnk I made it work as you suggested. Testing now, but need to know how On Sunday, January 5, 2014, Matt Hayes wrote:
Russell Jurney twitter.com/rjurney russell.jurney@gmail.com datasyndrome.com |
Using two constructors doesn't work. I am using SimpleEvalFunc. Ok, I will try using EvalFunc. |
Is there some way to modify SimpleEvalFunc so that I can use two constructors? I like using it. |
I think you should be able to have multiple constructors with SimpleEvalFunc. You just can't have multiple overloaded call implementations. You just need to ensure each calls super(). What is the problem you are having? |
I created call(String input) that calls call(String input, String path) On Sunday, January 5, 2014, Matt Hayes wrote:
Russell Jurney twitter.com/rjurney russell.jurney@gmail.com datasyndrome.com |
the call method is not a constructor
|
Good call. Lemme take another look. On Sunday, January 5, 2014, Matt Hayes wrote:
Russell Jurney twitter.com/rjurney russell.jurney@gmail.com datasyndrome.com |
How can I create a UDF with an optional 2nd argument? Two call() methods isn't working.
The text was updated successfully, but these errors were encountered: