alamb commented on code in PR #10818:
URL: https://github.com/apache/datafusion/pull/10818#discussion_r1631537285
##########
datafusion/core/src/execution/session_state.rs:
##########
@@ -141,7 +141,13 @@ 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?
+ .field("scalar_functions", &self.scalar_functions)
+ .field("aggregate_functions", &self.aggregate_functions)
+ .field("window_functions", &self.window_functions)
+ .field("config", &self.config)
+ .field("table_options", &self.table_options)
+ .field("execution_props", &self.execution_props)
+ .field("runtime_env", &self.runtime_env)
.finish()
Review Comment:
It might be good to call
https://doc.rust-lang.org/std/fmt/struct.DebugStruct.html#method.finish_non_exhaustive
here to make it clearer that there are some fields that are not printed.
Another technique I like is to at least add entries for unprintable fields
to make it clear they are there but not printed
For example
```rust
.field("table_factories", &"...")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]