Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
Duplicates IGNITE-20220
-
Docs Required, Release Notes Required
Description
According to the Spark documentation, the function weekofyear should return a number based on ISO rules:
A week is considered to start on a Monday and week 1 is the first week with >3 days.
The current implementation of the spark-extension uses WEEK when translating Spark SQL to H2 SQL, which returns the week-based year (locale-specific) from a date/time value.
The extensions should use ISO_WEEK
This function uses the ISO definition when first week of year should have at least four days and week is started with Monday.