Skip to content

bug: vertical sharding doesn't work well with scalar function #5205

Closed
@yeya24

Description

@yeya24

Describe the bug
Runs the PromQLsmith test and got an error for inconsistent results between vertical sharding and non sharding queries.

    query_fuzz_test.go:165: case 10 error mismatch.
        instant query: (
            (
                {job="test"}
              *
                bottomk without (job, __name__) (-(scalar({series="1"}) / time()), asinh(--{series="0"}))
            )
          >=
            max_over_time({__name__="test_series"}[2m])
        )
        err1: <nil>
        err2: execution: Scalar value NaN overflows int64

The query itself looks complex, but the key part is bottomk without (job, __name__) (-(scalar({series="1"}) / time()), xxxxxx). If a topk param is provided via scalar(some_series), if the series is not matched in the shard, then scalar will return NaN causing bottomk to fail. This is very similar to #5203.

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