diff --git a/datafusion/core/src/execution/session_state.rs b/datafusion/core/src/execution/session_state.rs index cffb63f52047..4953eecd66e3 100644 --- a/datafusion/core/src/execution/session_state.rs +++ b/datafusion/core/src/execution/session_state.rs @@ -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 { 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() } }