-
Notifications
You must be signed in to change notification settings - Fork 1.5k
style: simplify some strings for readability #15999
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
style: simplify some strings for readability #15999
Conversation
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.
Great effort in finding all format! positional arguments!
I left a few other minor improvement suggestions.
+1 for better readability. I'm wondering is there any clippy configurations to enforce this style? |
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.
Pull Request Overview
This PR simplifies string formatting throughout the codebase to improve readability and maintainability by leveraging new string interpolation syntax. Key changes include updating formatting in error messages, debug logs, and println! calls across multiple modules.
Reviewed Changes
Copilot reviewed 178 out of 178 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
datafusion/common/src/dfschema.rs | Simplified qualified name formatting using new interpolation syntax. |
datafusion/common/src/config.rs | Updated error messages to use new interpolation syntax. |
datafusion/catalog-listing/src/helpers.rs | Adjusted debug logging string interpolation. |
datafusion-examples/examples/sql_dialect.rs | Updated println! calls to use the new string interpolation syntax. |
datafusion-examples/examples/planner_api.rs | Switched formatting in plan printing to the new syntax. |
datafusion-examples/examples/function_factory.rs | Modified error message in UDAF placeholder parsing using new interpolation syntax. |
datafusion-examples/examples/expr_api.rs | Simplified assertion messages using new interpolation syntax. |
datafusion-examples/examples/dataframe.rs | Replaced format! calls in SQL queries with new string interpolation. |
datafusion-examples/examples/catalog.rs | Updated file creation formatting with new interpolation syntax. |
datafusion-cli/tests/cli_integration.rs | Transitioned AWS options formatting to use new syntax. |
datafusion-cli/src/print_options.rs | Updated several writeln! calls to use the new string interpolation syntax for consistency. |
datafusion-cli/src/pool_type.rs | Adjusted error messages with new interpolation syntax. |
datafusion-cli/src/main.rs | Revised version printing and file path error messages to use new interpolation syntax. |
datafusion-cli/src/functions.rs | Updated function display formatting with new interpolation syntax. |
datafusion-cli/src/exec.rs | Simplified error messages and SQL query formatting with new interpolation syntax. |
datafusion-cli/src/command.rs | Reformatted SQL commands and error messages using new interpolation syntax. |
datafusion-cli/src/catalog.rs | Changed expected output formatting using new interpolation syntax. |
benchmarks/src/util/options.rs | Simplified memory limit error message formatting with new interpolation syntax. |
Thanks!
There is. Since there are already a lot of changes in this pull request, I can look into adding the configuration in a future PR. |
b9e2aa7
to
cc4bd2d
Compare
cc4bd2d
to
4275d63
Compare
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.
Thank you. Filed #16021 for the follow-up task
You’re welcome! |
…trings-for-readability
I merged up from main to resolve some conflicts |
Thanks |
* style: simplify some strings for readability * fix: formatting in `datafusion/` directory * refactor: replace long `format!` string * refactor: replace `format!` with `assert_eq!` --------- Co-authored-by: Andrew Lamb <[email protected]>
* style: simplify some strings for readability * fix: formatting in `datafusion/` directory * refactor: replace long `format!` string * refactor: replace `format!` with `assert_eq!` --------- Co-authored-by: Andrew Lamb <[email protected]>
Which issue does this PR close?
Rationale for this change
The goal of this pull request is to improve code readability and maintainability.
What changes are included in this PR?
This change simplifies some strings in the codebase.
Are these changes tested?
Yes, via CI
Are there any user-facing changes?
No