From 83b661c36fae04bbe2fd50eebab0c79eedaef459 Mon Sep 17 00:00:00 2001 From: Ajeeta Asthana Date: Thu, 24 Apr 2025 20:18:38 -0400 Subject: [PATCH 1/5] deprecate schema expressions --- datafusion/common/src/dfschema.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datafusion/common/src/dfschema.rs b/datafusion/common/src/dfschema.rs index 66a26a18c0dc..d0737fe87767 100644 --- a/datafusion/common/src/dfschema.rs +++ b/datafusion/common/src/dfschema.rs @@ -969,12 +969,15 @@ impl Display for DFSchema { /// widely used in the DataFusion codebase. pub trait ExprSchema: std::fmt::Debug { /// Is this column reference nullable? + #[deprecated(since = "48.0.0", note = "Use to_field")] fn nullable(&self, col: &Column) -> Result; /// What is the datatype of this column? + #[deprecated(since = "48.0.0", note = "Use to_field")] fn data_type(&self, col: &Column) -> Result<&DataType>; /// Returns the column's optional metadata. + #[deprecated(since = "48.0.0", note = "Use to_field")] fn metadata(&self, col: &Column) -> Result<&HashMap>; /// Return the column's datatype and nullability From 98afee2d1899ac7280bbaaf60d07ab9f0439c41f Mon Sep 17 00:00:00 2001 From: Ajeeta Asthana Date: Fri, 25 Apr 2025 12:11:21 -0400 Subject: [PATCH 2/5] address review comment to include complete path --- datafusion/common/src/dfschema.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datafusion/common/src/dfschema.rs b/datafusion/common/src/dfschema.rs index d0737fe87767..1fc0a911c049 100644 --- a/datafusion/common/src/dfschema.rs +++ b/datafusion/common/src/dfschema.rs @@ -969,15 +969,15 @@ impl Display for DFSchema { /// widely used in the DataFusion codebase. pub trait ExprSchema: std::fmt::Debug { /// Is this column reference nullable? - #[deprecated(since = "48.0.0", note = "Use to_field")] + #[deprecated(since = "48.0.0", note = "Use ExprSchemable::to_field")] fn nullable(&self, col: &Column) -> Result; /// What is the datatype of this column? - #[deprecated(since = "48.0.0", note = "Use to_field")] + #[deprecated(since = "48.0.0", note = "Use ExprSchemable::to_field")] fn data_type(&self, col: &Column) -> Result<&DataType>; /// Returns the column's optional metadata. - #[deprecated(since = "48.0.0", note = "Use to_field")] + #[deprecated(since = "48.0.0", note = "Use ExprSchemable::to_field")] fn metadata(&self, col: &Column) -> Result<&HashMap>; /// Return the column's datatype and nullability From ac2dd31542079fa76839a5c0f60cd882da0bde5a Mon Sep 17 00:00:00 2001 From: Ajeeta Asthana Date: Wed, 7 May 2025 20:18:23 -0400 Subject: [PATCH 3/5] Update datafusion/common/src/dfschema.rs Co-authored-by: Oleks V --- datafusion/common/src/dfschema.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/common/src/dfschema.rs b/datafusion/common/src/dfschema.rs index 1fc0a911c049..813a2cf3a93e 100644 --- a/datafusion/common/src/dfschema.rs +++ b/datafusion/common/src/dfschema.rs @@ -977,7 +977,7 @@ pub trait ExprSchema: std::fmt::Debug { fn data_type(&self, col: &Column) -> Result<&DataType>; /// Returns the column's optional metadata. - #[deprecated(since = "48.0.0", note = "Use ExprSchemable::to_field")] + #[deprecated(since = "48.0.0", note = "Use ExprSchemable::metadata")] fn metadata(&self, col: &Column) -> Result<&HashMap>; /// Return the column's datatype and nullability From e441cfd130c57abb7625875f6f5f668b4d865475 Mon Sep 17 00:00:00 2001 From: Ajeeta Asthana Date: Wed, 7 May 2025 20:18:35 -0400 Subject: [PATCH 4/5] Update datafusion/common/src/dfschema.rs Co-authored-by: Oleks V --- datafusion/common/src/dfschema.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/common/src/dfschema.rs b/datafusion/common/src/dfschema.rs index 813a2cf3a93e..b22e1f82fac2 100644 --- a/datafusion/common/src/dfschema.rs +++ b/datafusion/common/src/dfschema.rs @@ -973,7 +973,7 @@ pub trait ExprSchema: std::fmt::Debug { fn nullable(&self, col: &Column) -> Result; /// What is the datatype of this column? - #[deprecated(since = "48.0.0", note = "Use ExprSchemable::to_field")] + #[deprecated(since = "48.0.0", note = "Use ExprSchemable::data_type")] fn data_type(&self, col: &Column) -> Result<&DataType>; /// Returns the column's optional metadata. From 49e54493aaeb7db436d1f9de924f3140dd81fbcc Mon Sep 17 00:00:00 2001 From: Ajeeta Asthana Date: Wed, 7 May 2025 20:18:39 -0400 Subject: [PATCH 5/5] Update datafusion/common/src/dfschema.rs Co-authored-by: Oleks V --- datafusion/common/src/dfschema.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/common/src/dfschema.rs b/datafusion/common/src/dfschema.rs index b22e1f82fac2..f65f13cd1118 100644 --- a/datafusion/common/src/dfschema.rs +++ b/datafusion/common/src/dfschema.rs @@ -969,7 +969,7 @@ impl Display for DFSchema { /// widely used in the DataFusion codebase. pub trait ExprSchema: std::fmt::Debug { /// Is this column reference nullable? - #[deprecated(since = "48.0.0", note = "Use ExprSchemable::to_field")] + #[deprecated(since = "48.0.0", note = "Use ExprSchemable::nullable")] fn nullable(&self, col: &Column) -> Result; /// What is the datatype of this column?