Bug 1506285

Summary: Osisoft translator - Syntax error on datasource for queries with LOCATE
Product: [JBoss] JBoss Data Virtualization 6 Reporter: Andrej Smigala <asmigala>
Component: TeiidAssignee: Van Halbert <vhalbert>
Status: CLOSED CURRENTRELEASE QA Contact: Andrej Smigala <asmigala>
Severity: high Docs Contact:
Priority: high    
Version: 6.4.0CC: blafond, dlesage, drieden, gjospin, jolee, jschatte, thauser, vhalbert
Target Milestone: CR2   
Target Release: 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Running a query with a locate function causes a syntax error on the Osisoft PI server. As a result, you will encounter an exception.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-13 17:34:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrej Smigala 2017-10-25 15:10:54 UTC
Running a query with LOCATE function causes a syntax error on the PI server:

> SELECT INTKEY FROM BQT1.SmallA WHERE LOCATE(2, INTKEY, 1) = 1

is pushed as

> SELECT g_0.IntKey AS c_0 FROM dvqe..SmallA AS g_0 WHERE cast(g_0.IntKey AS String)'2'1 = 1
.

Furthermore, query such as

> SELECT INTKEY, LOCATE(1, STRINGNUM) FROM BQT1.SmallA

fails on teiid (before push down) with IndexOutOfBoundsException.

See JIRA for details