[
https://issues.jboss.org/browse/TEIID-2111?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-2111:
---------------------------------------
Added the initial support. DDL metadata can now use the VARIADIC keyword instead of IN on
the last (non return/result set) parameter to a procedure or function to indicate that
varargs are expected.
For example:
create foreign procedure proc (x integer, VARIADIC z integer) returns (x string);
Within Teiid we'll treat the vararg parameter as an array. Within a virtual procedure
we will also correctly handle typed access to the parameter array using array_get and the
[] operator. The vararg array can be passed as a VARIADIC parameter to either functions
or procedures.
A pushdown procedure will have the parameter array unwound into separate IN parameter
arguments, with the expectation the the source procedure is also VARIADIC.
Design time support will still need to be validated. The docs also still need updating.
An implementation note: we do not have teiid types for array types, rather we just use
the corresponding java array type with the string name type[]. Also our handling of
functions and procedures is different with respect to varargs. Function support predated
any array type support so it's based around repeated parameters that are turned into
an array for function invocation. Procedures keep track of parameters either by name or
position (which then cannot conflict with result set columns) so repeating the parameter
is not possible. I'll probably look to convert the function handling into the
procedure style for consistency and also so that the function parameter typing is done up
front - rather than constantly referencing back to the datatypemanager.
Teiid Stored Procedure should support variable length arguments
---------------------------------------------------------------
Key: TEIID-2111
URL:
https://issues.jboss.org/browse/TEIID-2111
Project: Teiid
Issue Type: Enhancement
Components: Query Engine
Affects Versions: 7.7, 8.0
Environment: Windows 7, Jboss 5.x + Teiid7.x
Reporter: Rajasekhar Kota
Assignee: Steven Hawkins
Labels: Stored, argument, procedure, varargs, variable
Fix For: 8.2
We need extended support of Stored procedures with providing support of variable length
arguments(vararg). It saves our efforts a lot in our current product.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira