Skip to content

[SQL] Computations on waterlines should not panic #7594

Open

Description

@mihaibudiu

Today the compiler synthesizes computations on waterlines from the SQL program.
Waterlines have the same type as regular data, but hold conservative values for the data.
So a waterline for positive data can have negative values, for example.
However, some monotone functions are not defined on the same domain as the waterline: LOG of a negative value would panic.

Example:

CREATE TABLE T(ts INT NOT NULL LATENESS 10, x INT NOT NULL);
CREATE VIEW V AS SELECT CAST(LN(ts) AS VARCHAR) AS g, SUM(x) AS s FROM T GROUP BY LN(ts)

The fix is to actually synthesize carefully the computation on waterlines to avoid any panics.

Activity

  1. self-assigned this
    on Oct 22, 2026
  2. added theissue type on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

SQL compilerRelated to the SQL compiler

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions