-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-20316][SQL] Val and Var should strictly follow the Scala syntax #17628
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
Conversation
|
ok to test |
| private[hive] object SparkSQLCLIDriver extends Logging { | ||
| private var prompt = "spark-sql" | ||
| private var continuedPrompt = "".padTo(prompt.length, ' ') | ||
| private val prompt = "spark-sql" |
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.
This is very old code. Looks this change is okay. cc @liancheng
|
It is too trivial as a separate PR and I guess we don't need a JIRA for this change. I think we should find the similar instances at least (I don't think we want swarming PRs fixing such things). Also, I think we can fold #17629 into this here. |
|
It's always good to merge many such changes together into one single PR. |
|
Test build #75759 has finished for PR 17628 at commit
|
|
OK, I'll merge such changes together into this PR. |
|
Test build #75762 has started for PR 17628 at commit |
|
I would support this but only if we try to fix all such instances. The val/var changes has some value. However you're also removing 'return' and while that's probably OK as cleanup it's not actually improving much, so am not sure I'd do that. |
|
This is a very heavy task. So far, I found a problem with this when I was reading SparkSQL source code. |
|
Yeah, I'm surprised IntelliJ doesn't have an inspection for it. It's otherwise quite hard to find instances that can be changed. I would look for instances of IntelliJ can find all the |
|
Test build #75773 has finished for PR 17628 at commit
|
|
(You're matching no quotes. Match at least one. It will give you a smaller set to review.) |
|
OK, I will work on this again, Thanks. |
|
I serached the instance of var foo = "string" with the RegEx |
|
I will be surprised if we find much more of this in current branch. :-) |
|
@ouyangxiaochen that still isn't the right regex. Maybe there are no other instances but I'd ask for a minimal effort to find similar instances |
|
@srowen Do u mean that my regex can not match all variable name? because scala's variable name can be consisted with letter|digital|_|$? I serached the instances of |
|
|
|
OK, I got it. |
|
Merged to master |
## What changes were proposed in this pull request? val and var should strictly follow the Scala syntax ## How was this patch tested? manual test and exisiting test cases Author: ouyangxiaochen <[email protected]> Closes apache#17628 from ouyangxiaochen/spark-413.
What changes were proposed in this pull request?
val and var should strictly follow the Scala syntax
How was this patch tested?
manual test and exisiting test cases