Skip to content

Enable more datetime generalization functions #455

Description

@pdobacz

Having cast(extract(minute from ts) as integer)) supported, there are the following expressions which we can't bucket by at the moment (coming from from Metabase):

day:
  CAST(last_seen AS date)

day of week:
	CASE WHEN (((CAST(extract(dow from last_seen) AS integer) + 1) + 6) % 7) = 0 THEN 7 ELSE (((CAST(extract(dow from last_seen) AS integer) + 1) + 6) % 7) END

week of year:
	ceil((CAST(extract(doy from CAST(date_trunc('week', last_seen) AS timestamp)) AS integer) / 7.0))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions