Ivan Gagarkin created IGNITE-20223:
--------------------------------------

             Summary: ignite-spark-ext: 'select weekofyear' returns incorrect 
week number based on local rules
                 Key: IGNITE-20223
                 URL: https://issues.apache.org/jira/browse/IGNITE-20223
             Project: Ignite
          Issue Type: Bug
          Components: spark
            Reporter: Ivan Gagarkin


According to the Spark documentation, the function 
[weekofyear|https://spark.apache.org/docs/latest/api/sql/#weekofyear] should 
return a number based on ISO rules:
{quote}A week is considered to start on a Monday and week 1 is the first week 
with >3 days.
{quote}
The current implementation of the spark-extension uses 
[WEEK|http://www.h2database.com/html/functions.html#week[],|http://www.h2database.com/html/grammar.html#week_year_field],]
 which returns the week-based year (locale-specific) from a date/time value.

The extensions should use 
[ISO_WEEK|http://www.h2database.com/html/functions.html#iso_week]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to