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 Value-based InSource #2717

Closed
alecgrieser opened this issue May 13, 2024 · 0 comments · Fixed by #2724
Closed

Support Value-based InSource #2717

alecgrieser opened this issue May 13, 2024 · 0 comments · Fixed by #2724
Assignees
Labels
enhancement New feature or request planner Related to the query planner

Comments

@alecgrieser
Copy link
Contributor

Within the Cacades planner, there are methods for converting certain EXPLODE expressions into InSources for IN-join and IN-union planning. However, this logic is restricted to only LiteralValues (which get turned into InValues sources) and QuantifiedObjectValues (which get turned into InParameter sources). We're missing a few types, such as ConstantObjectValues.

We could add a Value-based InSource that can wrap ConstantObjectValues (etc) and then use those. There's a bit of work to consider here, to make sure that we don't use these values where it isn't appropriate. There's also some thought that we'll probably want to replace those with nested-loop joins and merge joins in the future, at which point we can probably remove these types of plans.

@alecgrieser alecgrieser added enhancement New feature or request planner Related to the query planner labels May 13, 2024
@alecgrieser alecgrieser self-assigned this May 13, 2024
alecgrieser added a commit to alecgrieser/fdb-record-layer that referenced this issue May 15, 2024
This allows for `IN`s with a `Value` based source to be used during query execution with an IN-join or IN-union plan. There already was an `InComparandSource`, so rather than introducing a new one, it makes use of that existing class.

This resolves FoundationDB#2717.
alecgrieser added a commit to alecgrieser/fdb-record-layer that referenced this issue May 15, 2024
This allows for `IN`s with a `Value` based source to be used during query execution with an IN-join or IN-union plan. There already was an `InComparandSource`, so rather than introducing a new one, it makes use of that existing class.

This resolves FoundationDB#2717.
normen662 pushed a commit that referenced this issue May 22, 2024
* update IN tests to be dual planner

* Resolves #2717: Support Value-based InSource

This allows for `IN`s with a `Value` based source to be used during query execution with an IN-join or IN-union plan. There already was an `InComparandSource`, so rather than introducing a new one, it makes use of that existing class.

This resolves #2717.

* remove planPartition filtering so that InJoin can be used with aggregates

* update release note

* remove `instanceof ConstantObjectValue` in favor of `.isConstant()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request planner Related to the query planner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant