Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-20225

ignite-spark-ext: 'select weekofyear' returns incorrect week number based on local rules

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • spark
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ivan.gagarkin Ivan Gagarkin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: