Bug 1506519 - Osisoft translator - SUBSTRING fails when start > string length
Summary: Osisoft translator - SUBSTRING fails when start > string length
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: Teiid, Documentation
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 6.4.0
Assignee: David Le Sage
QA Contact: Jan Stastny
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-26 09:32 UTC by Andrej Smigala
Modified: 2018-02-01 08:20 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
If you are using the OsiSoft translator and try to use the substring function in your queries, you will find that if the index is larger than the length of the string, an exception is thrown.
Clone Of:
Environment:
Last Closed: 2018-02-01 08:20:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker TEIID-5126 0 Minor Closed Osisoft translator - SUBSTRING fails when start > string length 2018-02-01 13:38:33 UTC

Description Andrej Smigala 2017-10-26 09:32:40 UTC
Calling a query such as

> SELECT cast(TIMESTAMPVALUE as string), SUBSTRING(TIMESTAMPVALUE, 22, 0) FROM BQT1.SmallA

fails with the following (the length of timestampvalue converted to string is 20):

> com.osisoft.rdsa.RdsaException: [PIOLEDBENT] Arguments are invalid.


This appears to be an issue with the SUBSTR implementation on the PI server, we are ok with either a workaround or documenting as KI.

Comment 3 David Le Sage 2017-12-03 22:06:25 UTC
Added to release notes errata as a known issue.

Comment 4 Andrej Smigala 2017-12-07 13:46:24 UTC
David, the doc text does not fully capture the nature of the KI. It mentions returning empty string instead of null or not supporting negative indexes, but none of that applies in this case. The real problem is that indexes larger than the length of the string result in an exception.


Note You need to log in before you can comment on or make changes to this bug.