-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Derive Debug
for SessionStateBuilder
, adding Debug
requirements to fields
#12632
Merged
+91
−35
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
b154670
Require Debug for PhysicalOptimizerRule
AnthonyZhOon f69d73c
Add reference to meet &JoinType type required
AnthonyZhOon 9f16647
Merge branch 'apache:main' into main
AnthonyZhOon 41d4788
Revert "Add reference to meet &JoinType type required" as clippy lint…
AnthonyZhOon e5d56ad
Merge branch 'apache:main' into main
AnthonyZhOon a58847e
Require `Debug` for `CatalogProvider`, `CatalogProviderList`, UrlTabl…
AnthonyZhOon 2d4a92d
Add derive Debug to meet api-change
AnthonyZhOon 4154da5
Add derive Debug in datafusion-cli to support api-change of CatalogPr…
AnthonyZhOon b507fd9
Require Debug for ExprPlanner
AnthonyZhOon 4abab5f
Require Debug for QueryPlanner
AnthonyZhOon 5459c46
Require Debug for TableFunctionImpl
AnthonyZhOon a14ec64
Require Debug for SerializerRegistry
AnthonyZhOon c259a94
Require Debug for FunctionFactory
AnthonyZhOon 58587e0
Derive `Debug` on `SessionStateBuilder`
AnthonyZhOon c9da519
Implement `Debug` for `SessionStateBuilder` to reorder output fields,…
AnthonyZhOon cdadebe
Settle TODO for displaying `Debug` of `InformationSchemaConfig` after…
AnthonyZhOon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,23 +177,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) | ||
.field("analyzer", &"...") | ||
.field("config", &self.config) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we could simply And perhaps we could provide a |
||
.field("runtime_env", &self.runtime_env) | ||
.field("catalog_list", &"...") | ||
.field("serializer_registry", &"...") | ||
.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("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() | ||
} | ||
} | ||
|
@@ -1519,6 +1519,37 @@ impl SessionStateBuilder { | |
} | ||
} | ||
|
||
impl Debug for SessionStateBuilder { | ||
/// 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("SessionStateBuilder") | ||
.field("session_id", &self.session_id) | ||
.field("config", &self.config) | ||
.field("runtime_env", &self.runtime_env) | ||
.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", &self.table_factories) | ||
.field("function_factory", &self.function_factory) | ||
.field("expr_planners", &self.expr_planners) | ||
.field("query_planners", &self.query_planner) | ||
.field("analyzer_rules", &self.analyzer_rules) | ||
.field("analyzer", &self.analyzer) | ||
.field("optimizer_rules", &self.optimizer_rules) | ||
.field("optimizer", &self.optimizer) | ||
.field("physical_optimizer_rules", &self.physical_optimizer_rules) | ||
.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() | ||
} | ||
} | ||
|
||
impl Default for SessionStateBuilder { | ||
fn default() -> Self { | ||
Self::new() | ||
|
@@ -1795,6 +1826,7 @@ impl From<&SessionState> for TaskContext { | |
} | ||
|
||
/// The query planner used if no user defined planner is provided | ||
#[derive(Debug)] | ||
struct DefaultQueryPlanner {} | ||
|
||
#[async_trait] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉