Jan Stastny created TEIID-4221:
----------------------------------
Summary: HANA translator: incorrect pushdown of week function
Key: TEIID-4221
URL:
https://issues.jboss.org/browse/TEIID-4221
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.5
Reporter: Jan Stastny
Assignee: Steven Hawkins
Hana translator pushes down function week to SAP HANA datasource as its WEEK function. But
it is not in accordance with the ISO8601 rule.
For this standard, HANA has function ISOWEEK, which returns results in following format:
{code:plain}
2000-W01 for date 'Jan 3, 2000'
{code}
So it should be possible to push Teiid's WEEK function as:
{code:sql}
SUBSTR_REGEXPR('[[:digit:]]{4}\-W([[:digit:]]{2})' IN ISOWEEK(datevalue) GROUP 1)
{code}
where 'datevalue' is column of DATE datatype.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)