Skip to content

Inconsistent rolling window behavior in Tesseract #10036

@davajm

Description

@davajm

Describe the bug
A simple rolling window sum is giving us different results depending on if Tesseract is enabled or not.

To Reproduce

  1. Define following model in Cube
cubes:
  - name: test_cube
    sql: |
      SELECT TIMESTAMP '2025-10-07 10:00:00' AS created_at, 1 AS val UNION ALL
      SELECT TIMESTAMP '2025-10-08 10:00:00' AS created_at, 2 AS val

    dimensions:
      - name: created_at
        sql: created_at
        type: time

    measures:
      - name: val
        type: sum
        sql: val
        rolling_window:
          trailing: unbounded
  1. Fetch measurement for whatever date range as long as it excludes one of the timestamps. Example filtering on 2025-10-08
{
  "measures": [
    "test_cube.val"
  ],
  "timeDimensions": [
    {
      "dimension": "test_cube.created_at",
      "dateRange": [
        "2025-10-08",
        "2025-10-08"
      ]
    }
  ],
  "filters": []
}
  1. Execute above with CUBEJS_TESSERACT_SQL_PLANNER set to false and then when set to true
  2. Note that it returns 3 when Tesseract is disabled, but 2 when enabled.

Expected behavior
I would expect them to be the same. Personally, the behavior when Tesseract is disabled looks more correct and stops us from being able to enable it right now.

Version:
1.3.78

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions