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

Cannot provide a set as input parameter for UDO #410

Open
antonio-olleros opened this issue Apr 29, 2024 · 0 comments
Open

Cannot provide a set as input parameter for UDO #410

antonio-olleros opened this issue Apr 29, 2024 · 0 comments
Labels

Comments

@antonio-olleros
Copy link

Issue Description

It is possible to define a UDO like this:

define operator test_set(ds dataset, set1 set, scalar1 string)
    returns dataset is
      ds
        [filter comp in set1]
end operator;

But then, when trying to invoke it:

B:= test_set(DS, {"a", "b"});

I get a grammar error:

 offendingSymbol: [@30,125:125='{',<5>,5:17] 
 msg: extraneous input '{' expecting {'(', '+', '-', 'eval', 'if', 'current_date', 'not', 'between', 'null', 'isnull', 'union', 'symdiff', 'intersect', 'check', 'exists_in', 'min', 'max', 'abs', 'ln', 'log', 'trunc', 'round', 'power', 'mod', 'length', 'trim', 'upper', 'lower', 'substr', 'sum', 'avg', 'median', 'count', 'exp', 'match_characters', 'nvl', 'hierarchy', '_', 'ltrim', 'rtrim', 'instr', 'replace', 'ceil', 'floor', 'sqrt', 'setdiff', 'stddev_pop', 'stddev_samp', 'var_pop', 'var_samp', 'first_value', 'last_value', 'lag', 'lead', 'ratio_to_report', 'fill_time_series', 'flow_to_stock', 'stock_to_flow', 'timeshift', 'inner_join', 'left_join', 'cross_join', 'full_join', 'period_indicator', 'time_agg', 'cast', 'check_datapoint', 'check_hierarchy', INTEGER_CONSTANT, NUMBER_CONSTANT, BOOLEAN_CONSTANT, STRING_CONSTANT, IDENTIFIER} 

Proposed Solution

Correct grammar to allow invoking UDO with set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant