Skip to content
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-3010] fix redundant conditional in spark #1923

Closed
wants to merge 2 commits into from

Conversation

scwf
Copy link
Contributor

@scwf scwf commented Aug 13, 2014

https://issues.apache.org/jira/browse/SPARK-3010

there are some redundant conditional in spark, such as
1.
private[spark] def codegenEnabled: Boolean =
if (getConf(CODEGEN_ENABLED, "false") == "true") true else false
2.
x => if (x == 2) true else false
...

this pr is to fix this

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@srowen
Copy link
Member

srowen commented Aug 13, 2014

(PS "excess judgment" doesn't quite make sense -- I think you mean "redundant conditional"?)
Yes that's redundant although I thought the consensus was not to fix trivial things like this unless making changes to the surrounding code anyway?

@scwf
Copy link
Contributor Author

scwf commented Aug 13, 2014

@srowen yes, i mean redundant conditional, do you mean we should fix all redundant conditions ?

@scwf scwf changed the title [SQL]Excess judgment [SQL]redundant conditional Aug 13, 2014
@scwf scwf changed the title [SQL]redundant conditional fix redundant conditional Aug 13, 2014
@scwf scwf changed the title fix redundant conditional [SPARK-3010] fix redundant conditional in spark Aug 13, 2014
@scwf scwf closed this Aug 15, 2014
@scwf scwf deleted the patch-4 branch August 22, 2014 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants