Skip to content

Commit 545f83b

Browse files
deprecate
1 parent 8b269b0 commit 545f83b

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

  • datafusion/ffi/src/physical_expr

datafusion/ffi/src/physical_expr/mod.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ pub struct FFI_PhysicalExpr {
112112

113113
pub fmt_sql: unsafe extern "C" fn(&Self) -> FFI_Result<SString>,
114114

115+
#[deprecated(
116+
since = "54.0.0",
117+
note = "downcast to `DynamicFilterPhysicalExpr` and call `current()` instead"
118+
)]
115119
pub snapshot: unsafe extern "C" fn(&Self) -> FFI_Result<FFI_Option<FFI_PhysicalExpr>>,
116120

117121
pub snapshot_generation: unsafe extern "C" fn(&Self) -> u64,
@@ -428,6 +432,7 @@ unsafe extern "C" fn clone_fn_wrapper(expr: &FFI_PhysicalExpr) -> FFI_PhysicalEx
428432
propagate_statistics: propagate_statistics_fn_wrapper,
429433
get_properties: get_properties_fn_wrapper,
430434
fmt_sql: fmt_sql_fn_wrapper,
435+
#[expect(deprecated)]
431436
snapshot: snapshot_fn_wrapper,
432437
snapshot_generation: snapshot_generation_fn_wrapper,
433438
is_volatile_node: is_volatile_node_fn_wrapper,
@@ -471,6 +476,7 @@ impl From<Arc<dyn PhysicalExpr>> for FFI_PhysicalExpr {
471476
propagate_statistics: propagate_statistics_fn_wrapper,
472477
get_properties: get_properties_fn_wrapper,
473478
fmt_sql: fmt_sql_fn_wrapper,
479+
#[expect(deprecated)]
474480
snapshot: snapshot_fn_wrapper,
475481
snapshot_generation: snapshot_generation_fn_wrapper,
476482
is_volatile_node: is_volatile_node_fn_wrapper,
@@ -941,16 +947,6 @@ mod tests {
941947
assert_eq!(left, right);
942948
}
943949

944-
#[test]
945-
fn ffi_physical_expr_snapshot_generation() {
946-
let (original, foreign_expr) = create_test_expr();
947-
948-
assert_eq!(
949-
original.snapshot_generation(),
950-
foreign_expr.snapshot_generation()
951-
);
952-
}
953-
954950
#[test]
955951
fn ffi_physical_expr_volatility() {
956952
let (original, foreign_expr) = create_test_expr();

0 commit comments

Comments
 (0)