Rodrigo Rueda created CALCITE-6226:
--------------------------------------
Summary: Wrong ISOWEEK and no ISOYEAR on BigQuery FORMAT_DATE
Key: CALCITE-6226
URL: https://issues.apache.org/jira/browse/CALCITE-6226
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.36.0, 1.35.0, 1.34.0
Reporter: Rodrigo Rueda
Fix For: 1.37.0
Doing:
{code:java}
FORMAT_DATE('%G-%V', DATE '2023-01-01'){code}
results in:
{code:java}
'%G-01'{code}
but should be:
{code:java}
2022-52{code}
The week is wrong because the ISOWEEK format function is not setting the
minimalDaysInFirstWeek to 4 and the ISOYEAR (%g or %G) was not implemented.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)