Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax type restrictions for queries with numeric literals #3634

Merged
merged 1 commit into from Nov 13, 2023

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented Nov 12, 2023

This changes expression evaluation for queries with numeric literals in two ways:

  1. Queries with a numeric literal against a field or type extractor no longer require the field's type and the numeric literal's inferred type to match exactly. This allows for querying without knowing whether a value is a signed or unsigned integer or a floating point number.
  2. Queries with value predicates (i.e., just a value without a field or type to compare against) now automatically expand to a disjunction covering all three numeric types when the value predicate is a numeric literal.

Tasks

Edit tasklist title
Beta Give feedback Tasklist Tasks, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Relax compatibility check for predicates with numeric values
    Options
  2. Make sure that expression evaluation handles overflow correctly (i.e., uses std::cmp_* functions)
    Options
  3. Expand value predicates for numeric literals to a disjunction covering all three types
    Options
  4. Update test expectations
    Options
  5. Write a changelog entry
    Options
  6. Check if documentation must be updated
    Options

@dominiklohmann dominiklohmann added engine Core pipeline and storage engine improvement An incremental enhancement of an existing feature labels Nov 12, 2023
This changes expression evaluation for queries with numeric literals in
two ways:
1. Queries with a numeric literal against a field or type extractor no
   longer require the field's type and the numeric literal's inferred
   type to match exactly. This allows for querying without knowing
   whether a value is a signed or unsigned integer or a floating point
   number.
2. Queries with value predicates (i.e., just a value without a field or
   type to compare against) now automatically expand to a disjunction
   covering all three numeric types when the value predicate is a
   numeric literal.
@dominiklohmann dominiklohmann merged commit 1d826ba into main Nov 13, 2023
41 checks passed
@dominiklohmann dominiklohmann deleted the topic/numeric-literal-binding branch November 13, 2023 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Core pipeline and storage engine improvement An incremental enhancement of an existing feature
Projects
None yet
2 participants