Commit Graph
8 Commits
Author SHA1 Message Date
Paul MasurelandPaul Masurel 047464cf92 Accelerating jitexpr conditions using necessary conditions (#3129)
* jitexpr

* Added possible necessary conditions to jitexpr.

A function makes it possible to infer a necessary query from an expression to match.
We can then accelerate queries involving a calculated field by not even evaluating the expression
on docs that trivially do not match.

* CR comment

* CR comment

* Fixing unit tests

---------

Co-authored-by: Paul Masurel <paul.masurel@datadoghq.com>
2026-09-28 18:46:37 +02:00
Paul MasurelandPaul Masurel 20d7f72f2c Addressing -0.0 problem in SafeF64 (#3109)
Co-authored-by: Paul Masurel <paul.masurel@datadoghq.com>
2026-09-17 12:29:31 +02:00
Paul Masurel 1496f58963 Added jitexpr compilation cache (#3107)
* Added jitexpr compilation cache
* Added jitexpr to the CI test matrix
2026-09-17 10:34:15 +02:00
Paul Masurel 94a116f103 (Calculated fields) Add feature-gated JIT expression document predicate (#3081) 2026-09-15 16:28:53 +02:00
Paul MasurelandPaul Masurel 99043285f9 Set jitexpr license to MIT (#3101)
Add MIT license metadata to the jitexpr crate manifest, matching
tantivy and the other workspace subcrates, and include a copy of
the MIT license text.

Co-authored-by: Paul Masurel <paul.masurel@datadoghq.com>
2026-09-14 15:08:55 +02:00
Paul Masurel 0c0530eeb4 Free JITModule executable memory when CompiledFn is dropped (#3090)
JITModule never releases its executable allocation on drop; the only
way to reclaim it is the consuming, unsafe JITModule::free_memory.
CompiledFn previously stored the module in a plain field, so every
compiled expression's executable memory leaked for the remainder of
the process once the CompiledFn was dropped.

Wrap the module in ManuallyDrop and add an explicit Drop impl for
CompiledFn that calls free_memory. This is safe because CompiledFn is
only ever constructed behind an Arc and never exposes its entry point
or other raw pointers into the module outside &self-bounded calls, so
drop only runs once no call into the module can be in flight or happen
afterward.

Verified empirically: 200k compile+drop cycles peaked at ~3.3 GB RSS
before this fix and ~6 MB after.
2026-09-10 21:22:01 +02:00
Paul Masurel 5a82f19f5d (Calculated fields) Implements more functions (#3083)
* Add remaining expression functions

Currently experimental (!)
2026-09-10 18:35:51 +02:00
Paul Masurel f8ec38fd9f (Calculated fields) Add JIT expression framework with ADD, IS_NULL, and REGEXP_EXTRACT (#3078)
Add JIT expression framework with ADD, IS_NULL, and REGEXP_EXTRACT
2026-09-10 15:30:02 +02:00