Skip to content

Add support for WEEK function #291

@knassre-bodo

Description

@knassre-bodo

Goal: add support for a function that takes in a datetime value and returns what week of the year it belongs to as an integer. This should work a lot like Snowflake's WEEK function (bear in mind complexities like its WEEK_OF_YEAR_POLICY and considerations of ISO weeks.

Before starting this issue, the following decisions need to be made:

  • What is the behavior of this function as far as how the first/last week are defined?
  • Is the first week 0 or 1?
  • How are the two behaviors above controlled by PyDough config variables, if at all?
  • If there are config variables, what should the defaults be?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationeffort - mediummid-sized issue with average implementation time/difficultyenhancementNew feature or requestuser featureAdding a new user-facing feature/functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions