1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
use IndexSet;
use stmt;
use crate;
/// Keeps the input rows for which `predicate` holds.
///
/// The predicate's `arg(0)` is the current row; `arg(1 + i)` is the whole
/// output of `args[i]`. Every input row is read (the whole input must be
/// scanned), so the input — and each predicate arg — is an
/// [`Always`](mir::InputRead::Always) read even though evaluation
/// is per-row. A predicate that reads only its args (a key-value
/// pre-filter) ignores `arg(0)`: when it is false every row is dropped, so
/// downstream operations see an empty list.
///
/// Used when the database cannot apply all filter conditions natively (e.g.,
/// NoSQL drivers with limited query capabilities).
pub