From c0f90795b6d90a9ef2785c1630caee8acb012d6d Mon Sep 17 00:00:00 2001 From: comphead Date: Sat, 4 Oct 2025 09:49:44 -0700 Subject: [PATCH 1/2] chore: rename Schema `print_tree_method` to `tree_string` --- datafusion-testing | 2 +- datafusion/common/src/dfschema.rs | 24 ++++++++++++------------ testing | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/datafusion-testing b/datafusion-testing index 905df5f65cc9..e9f9e22ccf09 160000 --- a/datafusion-testing +++ b/datafusion-testing @@ -1 +1 @@ -Subproject commit 905df5f65cc9d0851719c21f5a4dd5cd77621f19 +Subproject commit e9f9e22ccf09145a7368f80fd6a871f11e2b4481 diff --git a/datafusion/common/src/dfschema.rs b/datafusion/common/src/dfschema.rs index b195b1d4a184..05fd10112dfc 100644 --- a/datafusion/common/src/dfschema.rs +++ b/datafusion/common/src/dfschema.rs @@ -876,7 +876,7 @@ impl DFSchema { .zip(self.inner.fields().iter()) .map(|(qualifier, field)| (qualifier.as_ref(), field)) } - /// Print schema in tree format + /// Returns a tree-like string representation of the schema. /// /// This method formats the schema /// with a tree-like structure showing field names, types, and nullability. @@ -896,12 +896,12 @@ impl DFSchema { /// HashMap::new() /// ).unwrap(); /// - /// assert_eq!(schema.print_schema_tree().to_string(), + /// assert_eq!(schema.tree_string().to_string(), /// r#"root /// |-- id: int32 (nullable = false) /// |-- name: utf8 (nullable = true)"#); /// ``` - pub fn print_schema_tree(&self) -> impl Display + '_ { + pub fn tree_string(&self) -> impl Display + '_ { let mut result = String::from("root\n"); for (qualifier, field) in self.iter() { @@ -1982,7 +1982,7 @@ mod tests { ) .unwrap(); - let output = schema.print_schema_tree(); + let output = schema.tree_string(); insta::assert_snapshot!(output, @r" root @@ -2004,7 +2004,7 @@ mod tests { ) .unwrap(); - let output = schema.print_schema_tree(); + let output = schema.tree_string(); insta::assert_snapshot!(output, @r" root @@ -2042,7 +2042,7 @@ mod tests { ) .unwrap(); - let output = schema.print_schema_tree(); + let output = schema.tree_string(); insta::assert_snapshot!(output, @r" root |-- id: int32 (nullable = false) @@ -2058,7 +2058,7 @@ mod tests { #[test] fn test_print_schema_empty() { let schema = DFSchema::empty(); - let output = schema.print_schema_tree(); + let output = schema.tree_string(); insta::assert_snapshot!(output, @r###"root"###); } @@ -2131,7 +2131,7 @@ mod tests { ) .unwrap(); - let output = schema.print_schema_tree(); + let output = schema.tree_string(); insta::assert_snapshot!(output, @r" root @@ -2174,7 +2174,7 @@ mod tests { ) .unwrap(); - let output = schema.print_schema_tree(); + let output = schema.tree_string(); insta::assert_snapshot!(output, @r" root @@ -2213,7 +2213,7 @@ mod tests { ) .unwrap(); - let output = schema.print_schema_tree(); + let output = schema.tree_string(); insta::assert_snapshot!(output, @r" root @@ -2355,7 +2355,7 @@ mod tests { ) .unwrap(); - let output = schema.print_schema_tree(); + let output = schema.tree_string(); insta::assert_snapshot!(output, @r" root @@ -2430,7 +2430,7 @@ mod tests { ) .unwrap(); - let output = schema.print_schema_tree(); + let output = schema.tree_string(); insta::assert_snapshot!(output, @r" root diff --git a/testing b/testing index 0d60ccae40d0..d2a137123034 160000 --- a/testing +++ b/testing @@ -1 +1 @@ -Subproject commit 0d60ccae40d0e8f2d22c15fafb01c5d4be8c63a6 +Subproject commit d2a13712303498963395318a4eb42872e66aead7 From 136599d05e85bef63b04862fb77e1d2d9805bac7 Mon Sep 17 00:00:00 2001 From: comphead Date: Sat, 4 Oct 2025 09:55:02 -0700 Subject: [PATCH 2/2] Rollback mistaken submodule updates for datafusion-testing and testing --- datafusion-testing | 2 +- testing | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datafusion-testing b/datafusion-testing index e9f9e22ccf09..905df5f65cc9 160000 --- a/datafusion-testing +++ b/datafusion-testing @@ -1 +1 @@ -Subproject commit e9f9e22ccf09145a7368f80fd6a871f11e2b4481 +Subproject commit 905df5f65cc9d0851719c21f5a4dd5cd77621f19 diff --git a/testing b/testing index d2a137123034..0d60ccae40d0 160000 --- a/testing +++ b/testing @@ -1 +1 @@ -Subproject commit d2a13712303498963395318a4eb42872e66aead7 +Subproject commit 0d60ccae40d0e8f2d22c15fafb01c5d4be8c63a6