-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add query support for indexed artithmetic functions #2663
Labels
Comments
alecgrieser
added
enhancement
New feature or request
planner
Related to the query planner
labels
Apr 19, 2024
alecgrieser
added a commit
to alecgrieser/fdb-record-layer
that referenced
this issue
Apr 23, 2024
… functions This adds a new `FunctionKeyExpression` representing some basic arithmetic functions on `long`s, including `sum` and `bitand` (useful for when long fields are used as bitsets, and the user wants to define an index on individual bits in the bitset). This includes adding support for expressing the expression as a `Value` so that it can be matched within the Cascades planner. From the first test fixture added, it appears that the planner can already handle basic queries on this field, though it doesn't always recognize when it can skip a record resolution (e.g., when the function value is in both the result set and the index or when the argument fields are indexed). This resolves FoundationDB#2663.
alecgrieser
added a commit
to alecgrieser/fdb-record-layer
that referenced
this issue
May 13, 2024
… functions This adds a new `FunctionKeyExpression` representing some basic arithmetic functions on `long`s, including `sum` and `bitand` (useful for when long fields are used as bitsets, and the user wants to define an index on individual bits in the bitset). This includes adding support for expressing the expression as a `Value` so that it can be matched within the Cascades planner. From the first test fixture added, it appears that the planner can already handle basic queries on this field, though it doesn't always recognize when it can skip a record resolution (e.g., when the function value is in both the result set and the index or when the argument fields are indexed). This resolves FoundationDB#2663.
alecgrieser
added a commit
to alecgrieser/fdb-record-layer
that referenced
this issue
May 22, 2024
… functions This adds a new `FunctionKeyExpression` representing some basic arithmetic functions on `long`s, including `sum` and `bitand` (useful for when long fields are used as bitsets, and the user wants to define an index on individual bits in the bitset). This includes adding support for expressing the expression as a `Value` so that it can be matched within the Cascades planner. From the first test fixture added, it appears that the planner can already handle basic queries on this field, though it doesn't always recognize when it can skip a record resolution (e.g., when the function value is in both the result set and the index or when the argument fields are indexed). This resolves FoundationDB#2663.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using
FunctionKeyExpressions
, we can support indexes on things like "a + b" or "a & b" (bitwise and). We should provide those as some built-in queryable function key expressions that allows us to define queryable indexes on the function results.To make it work with Cascades, we should ensure that we have appropriate function values, and that we can match those during planning. We already have a few built-in function
Value
s for things like addition, though there are a few others that we'll need to add for things like bitwise operators.The text was updated successfully, but these errors were encountered: