Skip to content

Commit 95d9a94

Browse files
authored
[physical-plan]: remove deprecated UnionExec::new (apache#23100)
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - part of apache#23080 ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> `UnionExec::new` is deprecated in 44.0.0, and replaced `UnionExec::try_new` ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Removed the deprecated `UnionExec::new` constructor ## Are these changes tested? verified by running local tests for `datafusion-physical-plan` package <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> Yes. This removes a public Rust API `UnionExec::new` that was deprecated in 44.0.0. Downstream users should migrate to `UnionExec::try_new`. This is an API change and should be labeled `api change`.
1 parent ac67b28 commit 95d9a94

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

‎datafusion/physical-plan/src/union.rs‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,6 @@ pub struct UnionExec {
111111
}
112112

113113
impl UnionExec {
114-
/// Create a new UnionExec
115-
#[deprecated(since = "44.0.0", note = "Use UnionExec::try_new instead")]
116-
pub fn new(inputs: Vec<Arc<dyn ExecutionPlan>>) -> Self {
117-
let schema =
118-
union_schema(&inputs).expect("UnionExec::new called with empty inputs");
119-
// The schema of the inputs and the union schema is consistent when:
120-
// - They have the same number of fields, and
121-
// - Their fields have same types at the same indices.
122-
// Here, we know that schemas are consistent and the call below can
123-
// not return an error.
124-
let cache = Self::compute_properties(&inputs, schema).unwrap();
125-
UnionExec {
126-
inputs,
127-
metrics: ExecutionPlanMetricsSet::new(),
128-
cache: Arc::new(cache),
129-
}
130-
}
131-
132114
/// Try to create a new UnionExec.
133115
///
134116
/// # Errors

0 commit comments

Comments
 (0)