Skip to content
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

UDO default parameters #396

Open
NicoLaval opened this issue Feb 29, 2024 · 3 comments
Open

UDO default parameters #396

NicoLaval opened this issue Feb 29, 2024 · 3 comments
Labels
user defined operators Issues related to improving user defined operators

Comments

@NicoLaval
Copy link
Collaborator

Issue Description

Considering the following UDO

define operator my_func (p1 string default "p1", p2 string default "p2", p3 string default "p3", p4 string default "p4", p5 string default "p5", p6 string default "p6", p7 string default "p7", p8 string default "p8", p9 string default "p9", p10 string default "p10")
returns dataset is
...
end operator;

Instantiate it overriding the 8th parameter only, has to be:

my_func(_,_,_,_,_,_,_,"P8", "P999")

It's not very pretty, and a source of error.

Proposed Solution

Enable to instantiate functions with positional parameters, named parameters, mix, like Python does.
It would be helpful:

my_func(p8="P8", p9="P999")

@vpinna80
Copy link
Collaborator

vpinna80 commented Mar 4, 2024

I would hope to never encounter am operator with 9 parameters, but I agree nevertheless

@vpinna80 vpinna80 added the user defined operators Issues related to improving user defined operators label Mar 4, 2024
@NicoLaval
Copy link
Collaborator Author

I hope too but the example is in the abuse to demonstrate the concern

@antonio-olleros
Copy link

Agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
user defined operators Issues related to improving user defined operators
Projects
None yet
Development

No branches or pull requests

3 participants