IN and !? or "negated apply" #1746
Replies: 4 comments 8 replies
-
Some points to consider: Syntax for list:
Syntax for in operation:
|
Beta Was this translation helpful? Give feedback.
-
My vote is I like Re: looking like SQL vs not looking like SQL, I could care less whether it looks like SQL or not. I think our goal is to make what we think is the best language for semantic modeling and querying, regardless of what SQL does or does not do? In that case, I hope we are voting against |
Beta Was this translation helpful? Give feedback.
-
Also I can't figure out why, but I like |
Beta Was this translation helpful? Give feedback.
-
I see some support for I could maybe live with that, I think I was hopeful people would like a wildy overloaded |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is just a placeholder to write down things.
Early in experimenting with apply, we discovered that
x = 7 | 8
expands tox = 7 or x = 8
worked as we expected and we were pleased, however, if i wanted everything EXCEPT 7 or 8, and wrotex != 7 | 8
that expands tox !=7 or x !=8
which is true for all numbers. ( #1353 )Meanwhile, people who want the SQL
IN
operator are writingexpr ? (a | b | c)
... and wanting to know how to writeNOT IN
So here are some things that we could think about ...
IN and NOT IN
I really don't like this, because this is now a weird SQL wart which has appeared in Malloy. If we want to stop making Malloy it's own language and turn it into mostly SQL, I want to do that on purpose, not back into it a little bit at a time.
So until we say "I was a mistake for Malloy to have it's own syntax" I am against this idea, but it needs to b e mentioned.
in and !in
Using the
in
operator like sql, but using!in
like the existing!=
and!~
? and !?
Current use of apply, and adcd a new "not apply" ...
~ instead of in
~
is already "funky generic matching operator" so maybe we could extend it to funky generic match lists ...Beta Was this translation helpful? Give feedback.
All reactions