Skip to content

Commit 1e7c6e5

Browse files
committed
Improve comment
1 parent 6301891 commit 1e7c6e5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

benchmarks/src/util/memory.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ static CACHE: LazyLock<DashMap<Key, Value>> = LazyLock::new(DashMap::default);
2424

2525
/// Caches all the record batches in a global [CACHE] on the first run, and serves
2626
/// them from the cache in any subsequent run.
27+
/// The order of events looks like this:
28+
/// 1. A first query is run.
29+
/// 2. Data is not cached, so it is gathered from the underlying node.
30+
/// 3. The cache is populated with the recently gathered data.
31+
/// 4. A second query is run.
32+
/// 5. The cache is hit, and data is returned from there.
33+
///
34+
/// The cache key includes the result of "explaining" the underlying node, so different
35+
/// nodes applying different filters under the same parquet files will be cached
36+
/// independently.
2737
#[derive(Debug, Clone)]
2838
pub struct InMemoryCacheExec {
2939
inner: Arc<dyn ExecutionPlan>,

0 commit comments

Comments
 (0)