This is an automated email from the ASF dual-hosted git repository.
xudong963 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 8d542ecc13 Improve deprecation message for MemoryExec (#14322)
8d542ecc13 is described below
commit 8d542ecc13ddbb2be20448e61734ebc37134dfcf
Author: Andrew Lamb <[email protected]>
AuthorDate: Tue Jan 28 11:32:15 2025 -0500
Improve deprecation message for MemoryExec (#14322)
* Improve deprecation message for `MemoryExec`
* clippy
---
datafusion/physical-plan/src/values.rs | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/datafusion/physical-plan/src/values.rs
b/datafusion/physical-plan/src/values.rs
index a30b8981fd..b000f9335a 100644
--- a/datafusion/physical-plan/src/values.rs
+++ b/datafusion/physical-plan/src/values.rs
@@ -34,7 +34,16 @@ use datafusion_execution::TaskContext;
use datafusion_physical_expr::EquivalenceProperties;
/// Execution plan for values list based relation (produces constant rows)
-#[deprecated(since = "45.0.0", note = "Use `MemoryExec::try_new_as_values`
instead")]
+///
+/// Note this structure is the same as [`MemoryExec`] and is deprecated.
+/// Please see the following for alternatives
+/// * [`MemoryExec::try_new`]
+/// * [`MemoryExec::try_new_from_batches`]
+///
+/// [`MemoryExec`]: crate::memory::MemoryExec
+/// [`MemoryExec::try_new`]: crate::memory::MemoryExec::try_new
+/// [`MemoryExec::try_new_from_batches`]:
crate::memory::MemoryExec::try_new_from_batches
+#[deprecated(since = "45.0.0", note = "Use `MemoryExec` instead")]
#[derive(Debug, Clone)]
pub struct ValuesExec {
/// The schema
@@ -48,6 +57,7 @@ pub struct ValuesExec {
#[allow(deprecated)]
impl ValuesExec {
/// Create a new values exec from data as expr
+ #[deprecated(since = "45.0.0", note = "Use `MemoryExec::try_new` instead")]
pub fn try_new(
schema: SchemaRef,
data: Vec<Vec<Arc<dyn PhysicalExpr>>>,
@@ -101,6 +111,10 @@ impl ValuesExec {
///
/// Errors if any of the batches don't match the provided schema, or if no
/// batches are provided.
+ #[deprecated(
+ since = "45.0.0",
+ note = "Use `MemoryExec::try_new_from_batches` instead"
+ )]
pub fn try_new_from_batches(
schema: SchemaRef,
batches: Vec<RecordBatch>,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]