Repository navigation
docs: add a DataFrame::cache() example in staged and pipelined modes - #2890
Open
akshaychitneni wants to merge 1 commit into
Open
akshaychitneni wants to merge 1 commit into
akshaychitneni wants to merge 1 commit into
Conversation
The example caches a prepared DataFrame in one session, builds the cache with the first query and reads it in staged mode, then switches the session to pipelined mode and reads the same cache with three parallel queries that stream their rows as they arrive. The tuning guide's "Caching DataFrames" section includes it, and the pipelined guide notes how caching works there.
Contributor
Author
|
@andygrove @milenkovicm @comphead Added a small example to showcase df.cache with staged and pipeline mode. please take a look. Let me know if there's another use case or feature you'd like it to highlight. thanks |
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.
Part of #1829.
Rationale for this change
There is no example of
DataFrame::cache(), and none of pipelined mode. Therelease presents one engine for ETL and interactive queries, and caching is
where the two meet: prepare data once, then query it interactively.
What changes are included in this PR?
examples/examples/standalone-dataframe-cache.rs, in one session:SET, and read the same cache with threeparallel queries that stream their rows as they arrive;
examples/README.mdandexamples/Cargo.toml: register the example.works in both modes.
Are there any user-facing changes?
Documentation only: a new example and user-guide sections. No code or API
changes.