feat: vortex-datafusion segment cache#7809
Draft
ch-sc wants to merge 2 commits intovortex-data:developfrom
Draft
feat: vortex-datafusion segment cache#7809ch-sc wants to merge 2 commits intovortex-data:developfrom
ch-sc wants to merge 2 commits intovortex-data:developfrom
Conversation
Signed-off-by: Christoph Schulze <christoph.schulze@polygon.io>
…rtex-datafusion-segment-cache Signed-off-by: Christoph Schulze <christoph.schulze@polygon.io>
Contributor
|
I think there's an issue here where that the segment caches uses |
Author
|
Ah, I see. I don't have a clear solution in mind, but if |
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.
Summary
vortex-layoutalready provides aSegmentCachetrait and aMokaSegmentCacheimplementation, andvortex-file'sOpenOptionsalready haswith_segment_cache()that wires it into every file open.vortex-datafusionjust did not thread this through and so every new query re-reads data segments.This PR:
segment_cache: Option<Arc<dyn SegmentCache>>toVortexOpenerandVortexSource.OpenOptions::with_segment_cache()when opening each file inVortexOpener::open().VortexSource::with_segment_cache()so callers can inject a shared cache instance.Closes: #000
API Changes
Testing
The
segment_cachefield defaults toNone, so all existing behavior is unchanged when the cache is not configured.