From cfbfc03719ace0c1996cd861d789330a31666d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9E=97=E4=BC=9F?= Date: Sat, 8 Jun 2024 20:19:12 +0800 Subject: [PATCH] Debug print as many fields as possible for `SessionState` (#10818) * Print as many fields as possible for SessionState * Apply review suggestion --- .../core/src/execution/session_state.rs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/datafusion/core/src/execution/session_state.rs b/datafusion/core/src/execution/session_state.rs index 3b072ebb7384..fed101bd239b 100644 --- a/datafusion/core/src/execution/session_state.rs +++ b/datafusion/core/src/execution/session_state.rs @@ -141,8 +141,23 @@ impl Debug for SessionState { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { f.debug_struct("SessionState") .field("session_id", &self.session_id) - // TODO should we print out more? - .finish() + .field("analyzer", &"...") + .field("optimizer", &"...") + .field("physical_optimizers", &"...") + .field("query_planner", &"...") + .field("catalog_list", &"...") + .field("table_functions", &"...") + .field("scalar_functions", &self.scalar_functions) + .field("aggregate_functions", &self.aggregate_functions) + .field("window_functions", &self.window_functions) + .field("serializer_registry", &"...") + .field("config", &self.config) + .field("table_options", &self.table_options) + .field("execution_props", &self.execution_props) + .field("table_factories", &"...") + .field("runtime_env", &self.runtime_env) + .field("function_factory", &"...") + .finish_non_exhaustive() } }