-
Bug
-
Resolution: Done
-
Major
-
8.12.5
-
None
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:
Unable to find source-code formatter for language: plain. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
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.