Skip to content

ESQL: support for buckets larger than 1 year #120094

Description

@bpintea

Description

Currently, when BUCKETing, the time interval expressed in years cannot be larger than 1. However, specifying the interval in weeks allows for an arbitrary number. This issue is to look into removing the year restriction (or any other seemingly arbitrary ones)

Activity

  1. elasticsearchmachine commented on Jan 14, 2025

    @elasticsearchmachine
    Collaborator

    Pinging @elastic/es-analytical-engine (Team:Analytics)

  2. bpintea commented on Jan 14, 2025

    @bpintea
    ContributorAuthor

    Same applies to DATE_TRUNC (which BUCKET makes use of internally).

  3. kanoshiou commented on Jan 16, 2025

    @kanoshiou
    Contributor

    Hi @bpintea , I would like to address this issue🙂.

    My first thought is to add a cardinal parameter in roundFloor to indicate the interval as a multiple of this datetime unit.

    /**
    * This rounds down the supplied milliseconds since the epoch down to the next unit. In order to retain performance this method
    * should be as fast as possible and not try to convert dates to java-time objects if possible
    *
    * @param utcMillis the milliseconds since the epoch
    * @return the rounded down milliseconds since the epoch
    */
    abstract long roundFloor(long utcMillis);

  4. added a commit that references this issue on Apr 3, 2025
    30b2a1f
  5. added a commit that references this issue on Apr 9, 2025
    a92e5ae
  6. added 2 commits that reference this issue on Jun 18, 2025
    666f98c
    41d58c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions