Encode "in*" functions down into SQL when possible

Description

The "in" operator actually returns a boolean, so it's possible to use it as expression.
For the simple cases of equality with true/false avoid a syntax like "(x in (1,2,3)) = true" though.
(e.g., something like "(x in (1,2,3)) > false", for as weird as it looks, it's actually legit, at least in some databases).

The support for this conversion will be enabled on a db by db basis, since doing only the common case is hard (difficult to untangle the post-pre filter splitter to make it special case a function in a comparison operator) we'll enable it only for the cases in which using "in" as an expression is accepted by the database.

Environment

None

Status

Assignee

Andrea Aime

Reporter

Andrea Aime

Triage

None

Components

Fix versions

Priority

Medium
Configure