calcite icon indicating copy to clipboard operation
calcite copied to clipboard

[CALCITE-6226] Wrong ISOWEEK and no ISOYEAR on BigQuery FORMAT_DATE

Open rorueda opened this issue 1 year ago • 4 comments

https://issues.apache.org/jira/browse/CALCITE-6226

rorueda avatar Jan 26 '24 12:01 rorueda

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

6 New issues
0 Security Hotspots
83.7% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

sonarqubecloud[bot] avatar Jan 30 '24 12:01 sonarqubecloud[bot]

Since I had to rebase it onto master to address the last change request, I squashed the commits.

rorueda avatar Mar 09 '24 16:03 rorueda

It always struck me as strange that this change is using Calendar. Day of the week is simple if you convert to Julian date. JulianOn Mar 9, 2024, at 07:59, rorueda @.***> wrote: @rorueda commented on this pull request.

In core/src/test/java/org/apache/calcite/util/format/FormatElementEnumTest.java:

 assertFormatElement(FormatElementEnum.IW, "2014-09-30T10:00:00Z", "40");
  • // edge case where ISO WEEK != WEEK

I added additional test cases, all manually validated against BigQuery.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

julianhyde avatar Mar 09 '24 18:03 julianhyde