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

x != 'a' & 'b' and x = 'a' | 'b' Mean the same thing #2075

Open
mtoy-googly-moogly opened this issue Jan 3, 2025 · 0 comments
Open

x != 'a' & 'b' and x = 'a' | 'b' Mean the same thing #2075

mtoy-googly-moogly opened this issue Jan 3, 2025 · 0 comments
Labels
language An issue in the Malloy language

Comments

@mtoy-googly-moogly
Copy link
Collaborator

mtoy-googly-moogly commented Jan 3, 2025

There is code in our ecommerce example which uses

status != 'Cancelled' & 'Returned'

.. which works, but we had problems with users trying to use != and &, so we started warning on that instead of thinking through the problems
... and then without thinking it through, we did IN so now

status != 'Cancelled' | 'Returned'

writes status NOT IN ('Cancelled','Returned') is NOT the same as the alternation tree applied to the value.

The time has come to have more than a "put a bandaid on it and go implement something new" solution to this.

@mtoy-googly-moogly mtoy-googly-moogly changed the title x != 'a' & 'b' and x = x != 'a' & 'b' and x = 'a' | 'b' Mean the same thing Jan 3, 2025
@mtoy-googly-moogly mtoy-googly-moogly added the language An issue in the Malloy language label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language An issue in the Malloy language
Projects
None yet
Development

No branches or pull requests

1 participant