fn retain_membership_free_conjuncts(
expr: &Arc<dyn PhysicalExpr>,
max_payload_bytes: usize,
retention: ConjunctRetention,
) -> Result<DynFilterPayload>Expand description
Keeps the top-level conjuncts of a predicate that cannot be shipped as it stands.
Dropping an AND term can only widen a predicate, so the retained payload still never
drops a row the producer would keep. retention decides which conjuncts have to go. It
only widens as far as it has to: when the narrow retention leaves conjuncts that still do
not fit max_payload_bytes, the [InListExpr]-bearing ones are dropped as well, because
a static IN list is the node most likely to be the oversized one.
The refusal keeps the two reasons apart instead of folding them into “no wire form”:
nothing retained under ConjunctRetention::UnrepresentableLookup means the wire
really has no form for the predicate
(CommonQueryError::DynFilterUnsupported), while nothing retained under
ConjunctRetention::OverBudget (or a retained payload that still does not fit) is a
size refusal (CommonQueryError::DynFilterPayloadTooLarge). Transport never
substitutes true for either.