Derive Debug for SessionStateBuilder, adding Debug requirements to fields#12632
Derive Debug for SessionStateBuilder, adding Debug requirements to fields#12632alamb merged 16 commits intoapache:mainfrom
Debug for SessionStateBuilder, adding Debug requirements to fields#12632Conversation
… informs this is unnecessary This reverts commit f69d73c.
|
Needs the |
Debug for SessionStateBuilder, adding Debug requirements to fieldsDebug for SessionStateBuilder, adding Debug requirements to fields
|
Feel like not adding the derive Debug for |
… keep consistent Debug field order with `SessionState`
… `CatalogProviderList` requires `Debug`
|
Now the impl Debug for |
alamb
left a comment
There was a problem hiding this comment.
Thank you @AnthonyZhOon -- this looks like a great improvement to me. I agree that the actual utility of the Debug impl is debatable, but at least now it is possible
| impl Debug for InformationSchemaConfig { | ||
| fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { | ||
| f.debug_struct("InformationSchemaConfig") | ||
| // TODO it would be great to print the catalog list here |
| f.debug_struct("SessionState") | ||
| .field("session_id", &self.session_id) | ||
| .field("analyzer", &"...") | ||
| .field("config", &self.config) |
There was a problem hiding this comment.
I wonder if we could simply #derive(Debug) for SessionState now?
And perhaps we could provide a impl Display for SessionState that had a more readable format (like that shows session_id and deviation from default configuration, for example 🤔 )
|
Thanks again @AnthonyZhOon |
Which issue does this PR close?
Progress on #12555
Rationale for this change
To make configuration easier to use by providing debug output.
What changes are included in this PR?
DebugforCatalogProvider,CatalogProviderList,UrlTableFactory.DebugforExprPlanner,QueryPlanner.DebugforTableFunctionImplDebugforSerializerRegistryDebugforFunctionFactory#derivedebug on necessary classesDebugonSessionStateBuilderby deriving.Are these changes tested?
By the compiler and CI.
Are there any user-facing changes?
The additional
Debugrequirement is a user-facing API change on the traits affected.