Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fill in missing Debug fields for SessionState #12663

Merged
merged 23 commits into from
Sep 29, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b154670
Require Debug for PhysicalOptimizerRule
AnthonyZhOon Sep 25, 2024
f69d73c
Add reference to meet &JoinType type required
AnthonyZhOon Sep 25, 2024
9f16647
Merge branch 'apache:main' into main
AnthonyZhOon Sep 25, 2024
41d4788
Revert "Add reference to meet &JoinType type required" as clippy lint…
AnthonyZhOon Sep 25, 2024
e5d56ad
Merge branch 'apache:main' into main
AnthonyZhOon Sep 26, 2024
a58847e
Require `Debug` for `CatalogProvider`, `CatalogProviderList`, UrlTabl…
AnthonyZhOon Sep 26, 2024
2d4a92d
Add derive Debug to meet api-change
AnthonyZhOon Sep 26, 2024
4154da5
Add derive Debug in datafusion-cli to support api-change of CatalogPr…
AnthonyZhOon Sep 26, 2024
b507fd9
Require Debug for ExprPlanner
AnthonyZhOon Sep 26, 2024
4abab5f
Require Debug for QueryPlanner
AnthonyZhOon Sep 26, 2024
5459c46
Require Debug for TableFunctionImpl
AnthonyZhOon Sep 26, 2024
a14ec64
Require Debug for SerializerRegistry
AnthonyZhOon Sep 26, 2024
c259a94
Require Debug for FunctionFactory
AnthonyZhOon Sep 26, 2024
58587e0
Derive `Debug` on `SessionStateBuilder`
AnthonyZhOon Sep 26, 2024
c9da519
Implement `Debug` for `SessionStateBuilder` to reorder output fields,…
AnthonyZhOon Sep 26, 2024
cdadebe
Settle TODO for displaying `Debug` of `InformationSchemaConfig` after…
AnthonyZhOon Sep 26, 2024
4fd9738
Implement `Debug` for `SessionState` to be in sync with `SessionState…
AnthonyZhOon Sep 28, 2024
e16d08c
Implement `Debug` for `SessionState` to be in sync with `SessionState…
AnthonyZhOon Sep 28, 2024
0ce78a3
Merge branch 'catalog_provider_list' of github.com:AnthonyZhOon/dataf…
AnthonyZhOon Sep 28, 2024
3c6941b
Merge branch 'apache:main' into main
AnthonyZhOon Sep 28, 2024
3426158
Merge branch 'main' into catalog_provider_list
AnthonyZhOon Sep 28, 2024
4a0f840
Merge pull request #1 from AnthonyZhOon/catalog_provider_list
AnthonyZhOon Sep 28, 2024
251a52f
Correct name in `Debug` impl for `SessionState`
AnthonyZhOon Sep 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions datafusion/core/src/execution/session_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,27 +174,30 @@ pub struct SessionState {
}

impl Debug for SessionState {
/// Prefer having short fields at the top and long vector fields near the end
/// Group fields by
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we perhaps use #derive(Debug) instead?

Copy link
Contributor

@alamb alamb Sep 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's do it as a follow on. This PR is better than what is on main I think

f.debug_struct("SessionState")
.field("session_id", &self.session_id)
.field("config", &self.config)
.field("runtime_env", &self.runtime_env)
.field("catalog_list", &"...")
.field("serializer_registry", &"...")
.field("catalog_list", &self.catalog_list)
.field("serializer_registry", &self.serializer_registry)
.field("file_formats", &self.file_formats)
.field("execution_props", &self.execution_props)
.field("table_options", &self.table_options)
.field("table_factories", &"...")
.field("function_factory", &"...")
.field("expr_planners", &"...")
.field("query_planner", &"...")
.field("analyzer", &"...")
.field("optimizer", &"...")
.field("physical_optimizers", &"...")
.field("table_functions", &"...")
.field("table_factories", &self.table_factories)
.field("function_factory", &self.function_factory)
.field("expr_planners", &self.expr_planners)
.field("query_planners", &self.query_planner)
.field("analyzer", &self.analyzer)
.field("optimizer", &self.optimizer)
.field("physical_optimizers", &self.physical_optimizers)
.field("table_functions", &self.table_functions)
.field("scalar_functions", &self.scalar_functions)
.field("aggregate_functions", &self.aggregate_functions)
.field("window_functions", &self.window_functions)
.finish_non_exhaustive()
.finish()
}
}

Expand Down