physical-expr-common: remote PhysicalExpr::snapshot method#21975
Open
jayshrivastava wants to merge 1 commit intoapache:mainfrom
Open
physical-expr-common: remote PhysicalExpr::snapshot method#21975jayshrivastava wants to merge 1 commit intoapache:mainfrom
PhysicalExpr::snapshot method#21975jayshrivastava wants to merge 1 commit intoapache:mainfrom
Conversation
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
682e97c to
9aec9f2
Compare
PhysicalExpr::snapshot method
Contributor
|
@jayshrivastava can you rebase please? |
See apache#21807 `PhysicalExpr::snapshot` isn't required because it only applies to dynamic filters. The only place that its used is in `pruning_predicate.rs`. Since there's only one use case, we can just downcast to `DynamicFilterPhysicalExpr` and call `current()`. Remove `PhysicalExpr::snapshot` and associated code. Yes, the existing tests should cover the exact same functionality. Filter pushdown still workers with dynamic filters; we use `current()` instead of `snapshot()` to capture the expression. Yes. `PhysicalExpr::snapshot()` no longer exists. Users should downcast to `DynamicFilterPhysicalExpr` and call `current()` intead of calling `snapshot()`. Similarly, in `datafusion/ffi`, `FFI_PhysicalExpr` no longer has a `snapshot()` method.
9aec9f2 to
988ae5d
Compare
Contributor
Author
|
Rebased! |
adriangb
requested changes
May 1, 2026
Contributor
There was a problem hiding this comment.
I think there's little reason to not deprecate and stop using instead of removing altogether: https://datafusion.apache.org/contributor-guide/api-health.html#deprecation-guidelines
As far as I can tell it wouldn't be a big pain or impede future development much to keep these methods around as deprecated?
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.
Which issue does this PR close?
See #21807
Rationale for this change
PhysicalExpr::snapshotisn't required because it only applies todynamic filters. The only place that its used is in
pruning_predicate.rs. Since there's only one use case, we can justdowncast to
DynamicFilterPhysicalExprand callcurrent().What changes are included in this PR?
This change removes
PhysicalExpr::snapshotand associated code. Callers of this now downcast toDynamicFilterPhysicalExprand callcurrent().Are these changes tested?
Yes, the existing tests should cover the exact same functionality.
Filter pushdown still workers with dynamic filters; we use
current()instead of
snapshot()to capture the expression.Are there any user-facing changes?
Yes.
PhysicalExpr::snapshot()no longer exists. Users shoulddowncast to
DynamicFilterPhysicalExprand callcurrent()intead ofcalling
snapshot().Similarly, in
datafusion/ffi,FFI_PhysicalExprno longer has asnapshot()method.