(Calculated fields) Add calculated-field predicates to QueryAst - #6777
Open
fulmicoton wants to merge 3 commits into
Open
(Calculated fields) Add calculated-field predicates to QueryAst#6777fulmicoton wants to merge 3 commits into
fulmicoton wants to merge 3 commits into
Conversation
fulmicoton-dd
force-pushed
the
paul.masurel/calc-fields-integration
branch
2 times, most recently
from
September 7, 2026 20:40
5e6e6c7 to
7695065
Compare
fulmicoton
force-pushed
the
paul.masurel/calc-fields-integration
branch
from
September 8, 2026 08:40
7695065 to
2187a7a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add calculated-field predicates to Quickwit's native query AST and search preparation.
QueryAst::CalcField(CalcFieldQuery)with a jitexpr expression serialized as a string, including visitor/transformer support and user-query parsing passthrough.JitExprPredicate/DocPredicateQuery, keeping JIT compilation and execution in Tantivy.jitexprfeature and pinf1413a4dcfd1386a22df7d960a754b4bcfb1c3b4(the tip ofpaul.masurel/jitexpr-docpredicate), including support for.and#in expression variable names. Update dependency licenses.PartialEqbut no longer implementEq, matching jitexpr's expression type.Example:
{ "type": "calc_field", "expression": "(GT custom.duration 1i64)" }How was this PR tested?
cargo nextest run -p quickwit-query --locked: 172 passed, including 12 CalcField tests.cargo nextest run -p quickwit-doc-mapper -E 'test(query_builder::) | test(tag_pruning::)' --locked: 28 passed.Draft follow-ups / known limitations
cargo check --lockedstill fails atquickwit-directories/src/hot_directory.rs:462: the pinned TantivyIndexMetadoes not exposelist_segment_files.test_concatenate_multiple_fieldtest with default features. A diagnostic run withserde_json/preserve_orderpassed; no test or feature workaround was applied.