Skip to content

Filter with a list returns an incorrect result #469

Closed

Description

@max-sixty
from employees
filter [age > 25, age < 40]
SELECT
  employees.*
FROM
  employees
WHERE
  age > 25 age < 40

(in this case we can use in & .. but the principle holds)


I don't see much downside in disallowing lists and joining them with and, even though it's very easy to do two filters:

from employees
filter age > 25
filter age < 40

Activity

  1. added
    bug
    on May 8, 2022
  2. aljazerzen commented on May 10, 2022

    @aljazerzen
    Member

    To be honest, lists here don't make much sense.

    In my opinion ...

    from employees
    filter age > 25 and age < 40

    ... or ...

    from employees
    filter age > 25
    filter age < 40

    ... is much more readable than ...

    from employees
    filter [age > 25, age < 40]

    So I agree on disallowing lists.

  3. ajfriend commented on Jul 9, 2022

    @ajfriend

    FWIW, I'd vote for the "list AND" syntax, as I raised in #788 :)

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions