Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4221

HANA translator: incorrect pushdown of week function

    Details

      Description

      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:

      2000-W01 for date 'Jan 3, 2000'
      

      So it should be possible to push Teiid's WEEK function as:

      SUBSTR_REGEXPR('[[:digit:]]{4}\-W([[:digit:]]{2})' IN ISOWEEK(datevalue) GROUP 1)
      

      where 'datevalue' is column of DATE datatype.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                shawkins Steven Hawkins
                Reporter:
                jstastny Jan Stastny
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: