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

adapter: Expression cache design doc #29908

Merged
merged 22 commits into from
Oct 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions doc/developer/design/20241008_expression_cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ struct Expressions {
physical_plan: DataflowDescription<mz_compute_types::plan::Plan>,
dataflow_metainfos: DataflowMetainfo<Arc<OptimizerNotice>>,
notices: SmallVec<[Arc<OptimizerNotice>; 4]>,
optimizer_feature_overrides: OptimizerFeatureOverrides,
ggevay marked this conversation as resolved.
Show resolved Hide resolved
}

struct ExpressionCache {
Expand All @@ -84,13 +85,13 @@ impl ExpressionCache {
fn new(&mut self, deploy_generation: u64, information_needed_to_connect_to_durable_store: _) -> Self;

/// Remove all entries in current deploy generation that depend on a global ID that is not
/// present in `current_ids`.
/// present in `current_ids` or that do not have a matching `optimizer_feature_overrides`.
///
/// If `remove_prior_gens` is `true`, all previous generations are durably removed from the
/// If `remove_prior_gens` is `true`, all previous generations are durably removed from the
/// cache.
///
/// Returns all cached expressions.
fn open(&mut self, current_ids: &BTreeSet<GlobalId>, remove_prior_gens: bool) -> Vec<(GlobalId, Expressions)>;
/// Returns all cached expressions in the current deploy generation.
fn open(&mut self, current_ids: &BTreeSet<GlobalId>, optimizer_feature_overrides: &OptimizerFeatureOverrides, remove_prior_gens: bool) -> Vec<(GlobalId, Expressions)>;

/// Durably inserts `expressions` into current deploy generation.
///
Expand Down
Loading