Commit a156161
committed
tp: add In filter support to TypedCursor and optimize In bytecode
Add SetFilterValueListUnchecked to TypedCursor allowing callers to
pass a pointer+size array of FilterValue for In filters without
allocation. Plumb this through the codegen'd ConstCursor/Cursor.
Optimize the In bytecode by pre-building lookup structures during
CastFilterValueList instead of rebuilding on every Execute():
- For dense Id/Uint32: BitVector (built once, not per-call)
- For large sparse integer/string lists: FlatHashMapV2 for O(1)
- For small lists (<=16): linear scan (cache-friendly)
The lookup is stored as a variant in CastFilterValueListResult,
replacing the separate value_list field.
Migrate experimental_slice_layout to use In filter on track_id.1 parent 1ffa896 commit a156161
File tree
1 file changed
+15
-9
lines changed- src/trace_processor/perfetto_sql/intrinsics/table_functions
1 file changed
+15
-9
lines changedLines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | | - | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
101 | 109 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 110 | + | |
| 111 | + | |
106 | 112 | | |
107 | 113 | | |
108 | 114 | | |
| |||
0 commit comments