feat: add ValuesSource data source#24
Open
LLDay wants to merge 1 commit intodsemenov/resolve-placeholdersfrom
Open
feat: add ValuesSource data source#24LLDay wants to merge 1 commit intodsemenov/resolve-placeholdersfrom
LLDay wants to merge 1 commit intodsemenov/resolve-placeholdersfrom
Conversation
This commit introduces `ValuesSource`, a new data source specifically designed to handle constant values that may contain placeholders. It replaces the previous `MemorySourceConfig::try_new_as_values` implementation, providing the necessary infrastructure to resolve physical placeholders during execution while maintaining performance for constant-only data by falling back to the standard memory source.
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.
Rationale for this change
The previous implementation of
VALUESlist in DataFusion (viaMemorySourceConfig::try_new_as_values) required all expressions to be evaluated to constant scalars at plan time. This approach was incompatible with physical placeholders, which cannot be evaluated until execution time when parameter values are provided.By introducing
ValuesSource, we can now representVALUESlists that contain placeholders.What changes are included in this PR?
ValuesSource: A physical data source that can hold both constant values and placeholders.MemorySourceConfig::try_new_as_valuesmethod.Are these changes tested?
Yes, this PR includes:
ValuesSourcecan be serialized and deserialized via protobuf.Are there any user-facing changes?
Users can now use placeholders in
VALUESlists (e.g., inINSERTstatements or standaloneVALUESqueries), which previously might have failed during physical planning.