Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support tensor field presence checks as part of document selection evaluation #32993

Merged
merged 4 commits into from
Dec 5, 2024

Conversation

vekterli
Copy link
Member

@vekterli vekterli commented Dec 4, 2024

@geirst @toregge please review. Can be reviewed per commit, if desired.

For the C++ implementation, adds a sentinel TensorValue selection-internal type which is instantiated iff a field is a tensor, and which only allows for comparing against (explicit or implicit) null values. All other comparisons poison the expression with Invalid results. In other words, tensor contents cannot be inspected as part of selection evaluation.

This sentinel is also instantiated by the search core tensor attribute wiring.

The Java implementation has very different evaluation semantics, so the changes are mostly about enforcing Invalid results when using tensors in ways that are not supported.

Also doing some casual code cleanup.

Adds a sentinel `TensorValue` selection-internal type which is
instantiated iff a field is a tensor, and which only has true/false
semantics when compared against (explicit or implicit) `null` values.
All other comparisons poison the expression with `Invalid` results.
Also enforce that comparing with anything but `null` for
tensor field values returns `Invalid`.
Supports both attribute and non-attribute tensors.
@vekterli vekterli requested review from toregge and geirst December 4, 2024 16:26
Copy link
Member

@geirst geirst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@vekterli vekterli merged commit c929476 into master Dec 5, 2024
3 checks passed
@vekterli vekterli deleted the vekterli/support-tensor-field-presence-in-doc-sel branch December 5, 2024 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants