]
Ramesh Reddy commented on TEIID-4103:
-------------------------------------
You mean for "start" and "end" values above in the
"substring"? There has been changes in latest errata 03 about treating negative
values as to start from end of the string
OData - wrong string indexing in string functions indexof and
substring
------------------------------------------------------------------------
Key: TEIID-4103
URL:
https://issues.jboss.org/browse/TEIID-4103
Project: Teiid
Issue Type: Sub-task
Components: OData
Reporter: Michal Sanitrak
Assignee: Ramesh Reddy
By documentation \[1\] function indexof returns the zero-based character position of the
first occurrence of the second parameter value in the first parameter value.
Function substring doens't have explicitly specified indexing, but based on _Example
60_ \[2\] is function substring _zero-based_ too.
*indexof*
Reference service which supports OData V4:
*ULR:*
http://services.odata.org/V4/Northwind/Northwind.svc/Customers/?$filter=i...
eq 1
*Result:* Customer with CompanyName equals "Alfreds Futterkiste"
*URL:*
http://localhost:8080/odata4/olingo_basic/Source/SimpleDataTable/?$filter...
eq 1
*Result:* No entities
*Expected result:* Entity with intkey 1,2,3,4,8,9,10,11,12
*substring*
Reference service which supports OData V4:
*URL:*
http://services.odata.org/V4/Northwind/Northwind.svc/Customers/?$filter=i...
eq 1
*Result:* Customer with CompanyName equals "Alfreds Futterkiste"
*ULR:*
http://localhost:8080/odata4/olingo_basic/Source/SimpleDataTable/?$filter...,
1) eq 'alue_asdf'
*Result:* No entities
*Expected result:* Entity with intkey 10
\[1\]
https://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-u...
\[2\]
https://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part2-u...