Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
158 changes: 116 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion datafusion/ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ datafusion-proto-common = { workspace = true }
datafusion-session = { workspace = true }
futures = { workspace = true }
log = { workspace = true }
prost = { workspace = true }
prost = { version = "0.13" }
semver = "1.0.27"
tokio = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion datafusion/functions/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ md-5 = { version = "^0.10.0", optional = true }
num-traits = { workspace = true }
rand = { workspace = true }
regex = { workspace = true, optional = true }
sha2 = { version = "^0.10.9", optional = true }
sha2 = { version = "^0.10.8", optional = true }
unicode-segmentation = { version = "^1.7.1", optional = true }
uuid = { version = "1.19", features = ["v4"], optional = true }

Expand Down
12 changes: 6 additions & 6 deletions datafusion/physical-expr/src/expressions/dynamic_filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,14 @@ impl DynamicFilterPhysicalExpr {
/// that created the filter). This is useful to avoid computing expensive filter
/// expressions when no consumer will actually use them.
///
/// Note: We check the inner Arc's strong_count, not the outer Arc's count, because
/// when filters are transformed (e.g., via reassign_expr_columns during filter pushdown),
/// new outer Arc instances are created via with_new_children(), but they all share the
/// same inner `Arc<RwLock<Inner>>`. This is what allows filter updates to propagate to
/// consumers even after transformation.
/// # Implementation Details
///
/// We check both Arc counts to handle two cases:
/// - Transformed filters (via `with_new_children`) share the inner Arc (inner count > 1)
/// - Direct clones (via `Arc::clone`) increment the outer count (outer count > 1)
pub fn is_used(self: &Arc<Self>) -> bool {
// Strong count > 1 means at least one consumer is holding a reference beyond the producer.
Arc::strong_count(&self.inner) > 1
Arc::strong_count(self) > 1 || Arc::strong_count(&self.inner) > 1
}

fn render(
Expand Down
6 changes: 2 additions & 4 deletions datafusion/physical-plan/src/joins/hash_join/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,10 +513,8 @@ impl HashJoinExec {
///
/// This method is intended for testing only and should not be used in production code.
#[doc(hidden)]
pub fn dynamic_filter_for_test(&self) -> Option<Arc<DynamicFilterPhysicalExpr>> {
self.dynamic_filter
.as_ref()
.map(|df| Arc::clone(&df.filter))
pub fn dynamic_filter_for_test(&self) -> Option<&Arc<DynamicFilterPhysicalExpr>> {
self.dynamic_filter.as_ref().map(|df| &df.filter)
}

/// Calculate order preservation flags for this hash join.
Expand Down
2 changes: 1 addition & 1 deletion datafusion/proto-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ json = ["serde", "pbjson"]
arrow = { workspace = true }
datafusion-common = { workspace = true }
pbjson = { workspace = true, optional = true }
prost = { workspace = true }
prost = { version = "0.13" }
serde = { version = "1.0", optional = true }

[dev-dependencies]
Expand Down
Loading