lszskye opened a new pull request, #451:
URL: https://github.com/apache/paimon-cpp/pull/451
### Purpose
Existing search setters cannot represent full-text conditions inside mixed
AND/OR filters, such as `body matches "apple" OR price < 10`.
This PR introduces the predicate semantics and interfaces for these queries:
- Add `FullTextMatch` as a leaf in the existing predicate tree, using the
same JSON DSL as `FullTextSearch` without TopK truncation.
- Preserve full-text conditions during projection, field reordering, and
schema renaming without modifying the original shared request.
- Retain the root TopK setters and validate positive limits and nonempty
search inputs.
- Resolve explicit `_<field>_INDEX_SCORE` projections and bind each output
position to a search type and original table field name.
- Reject missing or ambiguous score sources and score-producing full-text
conditions beneath OR. Root TopK requires internal scores regardless
of projection.
This PR covers construction, validation, and binding. Full-text predicate
execution, scan pruning with full-text predicates, and per-field score
materialization return `NotImplemented`. Mixed-query execution, cross-file
TopK merging, and selectivity-based scheduling will follow separately.
### Tests
Added coverage for:
- Predicate construction, equality, AND/OR composition, and unsupported
scalar/statistics evaluation.
- Projection validation and field rename/reorder mapping.
- Score bindings, projection precedence, duplicate sources, and OR
restrictions.
- Root TopK score requirements and search-type isolation.
- Explicit rejection of unsupported scan and read execution.
- Cross-module casts from the new predicate to `LeafPredicate`.
### API and Format
Adds:
- `FullTextMatch`
- `PredicateBuilder::FullTextMatch`
- `PredicateUtils::ContainsFullTextMatch`
- `Function::Type::FULL_TEXT_MATCH`
- `FileIndexReader::VisitFullTextMatch`
### Documentation
Document predicate composition, root TopK semantics, score projection rules,
and current execution limitations in `docs/source/api/file_index.rst`.
### Generative AI tooling
Generated-by: OpenAI Codex (GPT-6)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]