[JBoss JIRA] (TEIID-5725) Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5725?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5725:
---------------------------------------
There are two aspects here, one is if there is documentation for the base (non-odata) case. And the other is what is documented with regards to odata. The former is mostly covered. The latter is touched on only briefly.
Do you mostly need an expanded section in the OData docs discussing actions and functions as they relate to teiid procedures?
> Especially, how are OUT and INOUT params set and how can they be obtained via odata.
There is no concept of an OUT or INOUT parameter in OData. There is only IN and RETURN. A result set returned from a procedure is mapped to a complex return value.
> How is the return value of a virtual function set?
Are you asking from an OData or just sql perspective? OData metadata currently does not utilize Teiid defined functions.
For core Teiid with a Java defined function see: http://teiid.github.io/teiid-documents/master/content/dev/Support_for_Use...
For just DDL see: http://teiid.github.io/teiid-documents/master/content/reference/DDL_Metad... Create Procedure/Function - I'll update this page to use a table of contents and unfortunately it does not explicitly show the usage of a RETURN statement http://teiid.github.io/teiid-documents/master/content/reference/Procedure...
{code}
CREATE VIRTUAL FUNCTION CustomerRank(customerid integer)
RETURNS integer AS
BEGIN
...
RETURN expression;
END
{code}
> How are collections and arrays of collections returned?
Collections/arrays as parameters are not allowed in OData - I recall logging an issue against Olingo 2.
A result set is mapped automatically to a complex type collection result. A array result will be mapped to a simple type collection.
Multi-dimensional arrays are not supported by OData.
> Please improve documentation on definition of stored procedures, virtual functions and virtual procedures
> ---------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5725
> URL: https://issues.jboss.org/browse/TEIID-5725
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Christoph John
> Assignee: Steven Hawkins
> Priority: Critical
>
> I refer to the discussion with Ramesh in
> https://developer.jboss.org/message/989048#989048 and would like to ask for a more detailed explanation on how to write virtual procedures and functions.
> -Especially, how are OUT and INOUT params set and how can they be obtained via odata.
> - How is the return value of a virtual function set?
> - How are collections and arrays of collections returned?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 11 months
[JBoss JIRA] (TEIID-5726) java.lang.NullPointerException when calling a stored procedure via Teiid
by Christoph John (Jira)
Christoph John created TEIID-5726:
-------------------------------------
Summary: java.lang.NullPointerException when calling a stored procedure via Teiid
Key: TEIID-5726
URL: https://issues.jboss.org/browse/TEIID-5726
Project: Teiid
Issue Type: Enhancement
Components: OData
Affects Versions: 12.1
Reporter: Christoph John
Assignee: Steven Hawkins
Attachments: log3.txt, srcProc.txt, svc-vdb.ddl
I try to create a function import for a stored procedure which I have in my sql database. When executing the stored procedure via mysql workbench, the stored procedure does fine.
I have described the issue in my first message in
https://developer.jboss.org/message/989044#989044
in detail. Attached you find the excerpt from the teiid error log and my vdb file. The relevant stored procedure is named srcProc and is also attached.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 11 months
[JBoss JIRA] (TEIID-5724) Issues with Informix Date/Time types
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5724?page=com.atlassian.jira.plugin... ]
Steven Hawkins edited comment on TEIID-5724 at 4/19/19 4:24 PM:
----------------------------------------------------------------
Corrected the type mappings and updated the calendar methods to either not use a calendar or to use a cloned one.
The informix client will keep date/time/timestamp values consistent with respect to calendar fields for a given client timezone - that is regardless of what the client timezone is in, a value of 2000-01-01 01:01:01 will always be displayed in the local timezone.
The database timezone property should only be set if that is not the desired behavior, and instead want the values adjusted to assume a fixed timezone.
However as noted in the older issue the informix driver for some reason seems to adjust timestamps and time values in the opposite direction. With the Teiid server in GMT (or really any timezone) a given set of row values for a query are:
Date
2000-02-19
Time
01:00:00
Timestamp
2000-01-01 00:00:49.0
With the client in GMT and the DatabaseTimezone set to GMT-1, you see:
Date
2000-02-19
Time
00:00:00
Timestamp
2000-01-01 01:00:49.0
Note the time and timestamp moved in opposite directions. I did a second commit to account for this by switching to our logic for the adjustment.
was (Author: shawkins):
Corrected the type mappings and updated the calendar methods to either not use a calendar or to use a cloned one.
The informix client will keep date/time/timestamp values consistent with respect to calendar fields for a given client timezone - that is regardless of what the client timezone is in, a value of 2000-01-01 01:01:01 will always be displayed in the local timezone.
The database timezone property should only be set if that is not the desired behavior, and instead want the values adjusted to assume a fixed timezone. However as noted in the older issue the informix driver for some reason seems to adjust timestamps and time values in the opposite direction. With the Teiid server in GMT (or really any timezone) a given set of row values for a query are:
Date
2000-02-19
Time
01:00:00
Timestamp
2000-01-01 00:00:49.0
With the client in GMT and the DatabaseTimezone set to GMT-1, you see:
Date
2000-02-19
Time
00:00:00
Timestamp
2000-01-01 01:00:49.0
Note the time and timestamp moved in opposite directions. I did not yet try to account for this assuming for now that most will want the default behavior.
> Issues with Informix Date/Time types
> ------------------------------------
>
> Key: TEIID-5724
> URL: https://issues.jboss.org/browse/TEIID-5724
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2, 11.2.3, 12.1.1
>
>
> Informix date/time issues include:
> Timestamp/Time are mapped to the same conversion - datetime hour to second
> The Timestamp mapping needs to be fully specified - datetime year to fraction(5), not just datetime
> Usage of the getXXX Resultset methods passing a Calendar result in odd behavior as Informix modifies that Calendar.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 11 months
[JBoss JIRA] (TEIID-5724) Issues with Informix Date/Time types
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5724?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5724.
-----------------------------------
Resolution: Done
Corrected the type mappings and updated the calendar methods to either not use a calendar or to use a cloned one.
The informix client will keep date/time/timestamp values consistent with respect to calendar fields for a given client timezone - that is regardless of what the client timezone is in, a value of 2000-01-01 01:01:01 will always be displayed in the local timezone.
The database timezone property should only be set if that is not the desired behavior, and instead want the values adjusted to assume a fixed timezone. However as noted in the older issue the informix driver for some reason seems to adjust timestamps and time values in the opposite direction. With the Teiid server in GMT (or really any timezone) a given set of row values for a query are:
Date
2000-02-19
Time
01:00:00
Timestamp
2000-01-01 00:00:49.0
With the client in GMT and the DatabaseTimezone set to GMT-1, you see:
Date
2000-02-19
Time
00:00:00
Timestamp
2000-01-01 01:00:49.0
Note the time and timestamp moved in opposite directions. I did not yet try to account for this assuming for now that most will want the default behavior.
> Issues with Informix Date/Time types
> ------------------------------------
>
> Key: TEIID-5724
> URL: https://issues.jboss.org/browse/TEIID-5724
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2, 11.2.3, 12.1.1
>
>
> Informix date/time issues include:
> Timestamp/Time are mapped to the same conversion - datetime hour to second
> The Timestamp mapping needs to be fully specified - datetime year to fraction(5), not just datetime
> Usage of the getXXX Resultset methods passing a Calendar result in odd behavior as Informix modifies that Calendar.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 11 months
[JBoss JIRA] (TEIID-5724) Issues with Informix Date/Time types
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-5724:
-------------------------------------
Summary: Issues with Informix Date/Time types
Key: TEIID-5724
URL: https://issues.jboss.org/browse/TEIID-5724
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 12.2, 11.2.3, 12.1.1
Informix date/time issues include:
Timestamp/Time are mapped to the same conversion - datetime hour to second
The Timestamp mapping needs to be fully specified - datetime year to fraction(5), not just datetime
Usage of the getXXX Resultset methods passing a Calendar result in odd behavior as Informix modifies that Calendar.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
6 years, 11 months