-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-46055][SQL][FOLLOWUP] Respect code style for scala. #44079
Conversation
50ccf76
to
4b0b930
Compare
ping @heyihong cc @cloud-fan |
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.
LGTM
@@ -503,7 +503,7 @@ class CatalogImpl(sparkSession: SparkSession) extends Catalog { | |||
*/ | |||
override def databaseExists(dbName: String): Boolean = { | |||
try { | |||
getDatabase(dbName) | |||
makeDatabase(None, dbName: String) |
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.
why do we make it more verbose here?
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.
Reduce the stack depth.
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.
the readability will become worse ... I like it the way it was originally
4b0b930
to
88aaff5
Compare
@@ -503,7 +503,7 @@ class CatalogImpl(sparkSession: SparkSession) extends Catalog { | |||
*/ | |||
override def databaseExists(dbName: String): Boolean = { | |||
try { | |||
getDatabase(dbName) | |||
makeDatabase(None, dbName) |
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.
I disagree with this change. There is nearly no benefit and it's kind of encouraging people to never use parameter default values but just call the base function with all parameter values specified.
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.
SGTM. Let's revert it.
88aaff5
to
10fee00
Compare
fetchMetadata: Boolean): ResolvedNamespace = { | ||
catalog: CatalogPlugin, | ||
ns: Seq[String], | ||
fetchMetadata: Boolean): ResolvedNamespace = { |
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.
Is this the only indentation issue in this file, @beliefer ?
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.
Yes.
Merged to master. |
### What changes were proposed in this pull request? apache#43959 get metadata when resolving catalogs instead of directly calling catalog. This PR fix one minor issues that some code didn't follow the code style of scala. ### Why are the changes needed? Respect code style for scala. ### Does this PR introduce _any_ user-facing change? 'No'. ### How was this patch tested? Exists test cases. ### Was this patch authored or co-authored using generative AI tooling? 'No'. Closes apache#44079 from beliefer/SPARK-46055_followup. Authored-by: Jiaan Geng <beliefer@163.com> Signed-off-by: Jiaan Geng <beliefer@163.com>
What changes were proposed in this pull request?
#43959 get metadata when resolving catalogs instead of directly calling catalog.
This PR fix one minor issues that some code didn't follow the code style of scala.
Why are the changes needed?
Respect code style for scala.
Does this PR introduce any user-facing change?
'No'.
How was this patch tested?
Exists test cases.
Was this patch authored or co-authored using generative AI tooling?
'No'.