[teiid-issues] [JBoss JIRA] (TEIID-4221) HANA translator: incorrect pushdown of week function

Jan Stastny (JIRA) issues at jboss.org
Wed May 25 06:52:00 EDT 2016


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)


More information about the teiid-issues mailing list