Skip to content

rust: reject nonfinite numeric-within tolerances #973

Closed

Description

@athvin

Evidence

The numeric_within: level parser rejects negative tolerances but accepts NaN and infinity, then emits them into SQL. The nearby geographic comparator already rejects nonfinite values because DuckDB comparisons with NaN can match unexpectedly. Source.

Change

Require a finite, nonnegative absolute tolerance before constructing SQL. Keep this string-token validation separate from numeric YAML field validation in #970.

Done when

  • numeric_within:NaN, :inf, and negative values fail with BadLevelParameter.
  • Finite zero and positive tolerances compile and retain their current SQL behavior.

Activity

  1. added
    code-cleanup
    on Nov 9, 2026
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

    code-cleanup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions