Vladimir, I’ve reverted your revert. A commit war is no way to proceed.
Julian > On Nov 14, 2020, at 2:55 AM, Vladimir Sitnikov <[email protected]> > wrote: > > I've reverted SEARCH. Sorry for the inconvenience. > > Here's the PR that re-adds SEARCH: > https://github.com/apache/calcite/pull/2263 > Please feel free to pick it up. I expect certain commits should be squashed > (e.g. search should be re-added as a single commit). > > I'm not sure I would have time to make it happen. > > Frankly speaking, I would suggest we should make SEARCH operator never > return null. > In other words, SEARCH(X, [Y, Z]) should be the same as "(X is not distinct > from Y) or (X is not distinct from Z)". > The old semantics was like SEARCH(null, [42]) => unknown, SEARCH(null, > [null, 42]) => false which results in wrong results in simplification. > > "Expand search" might want to receive unknownAs parameter. > > Vladimir
