Uh oh!
There was an error while loading. Please reload this page.
[SPARK-3010] fix redundant conditional - #1992
Conversation
AmplabJenkins
commented
Aug 17, 2014
Can one of the admins verify this patch? |
There was a problem hiding this comment.
If you really want to trim redundancy, the parens are now unnecessary -- as are the braces and the 'x'. So, you could pare this all the way down to:
valprunedRDD2=PartitionPruningRDD.create(rdd, _ ==2)markhamstra
commented
Aug 17, 2014
Something seems to be amiss in this PR: Several of your changes are neither in And some of your changes don't really go all the way toward cleaning up the logic. For example, (aclsEnabled() && (user !=null) && (!viewAcls.contains(user))) ==falsewould be better as !aclsEnabled || user ==null|| viewAcls.contains(user) |
scwf
commented
Aug 17, 2014
@markhamstra, thanks for comments. I have merged SecurityManager right now and updated with your comments. |
mateiz
commented
Aug 30, 2014
Jenkins, test this please |
mateiz
commented
Aug 30, 2014
Looks good to me pending tests |
SparkQA
commented
Aug 30, 2014
QA tests have started for PR 1992 at commit
|
SparkQA
commented
Aug 31, 2014
QA tests have finished for PR 1992 at commit
|
scwf
commented
Aug 31, 2014
mateiz
commented
Aug 31, 2014
Jenkins, test this please |
SparkQA
commented
Aug 31, 2014
QA tests have started for PR 1992 at commit
|
SparkQA
commented
Aug 31, 2014
QA tests have finished for PR 1992 at commit
|
scwf
commented
Aug 31, 2014
@mateiz retest this again, tests failed in sparkstreaming, thanks. |
pwendell
commented
Aug 31, 2014
Jenkins, test this please. |
scwf
commented
Aug 31, 2014
hi @pwendell, jenkins fetch error. |
JoshRosen
commented
Aug 31, 2014
Jenkins, retest this please. |
SparkQA
commented
Aug 31, 2014
QA tests have started for PR 1992 at commit
|
SparkQA
commented
Aug 31, 2014
QA tests have finished for PR 1992 at commit
|
mateiz
commented
Aug 31, 2014
Merged this, thanks! |
https://issues.apache.org/jira/browse/SPARK-3010 this pr is to fix 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 ... Author: scwf <wangfei1@huawei.com> Author: wangfei <wangfei_hello@126.com> Closesapache#1992 from scwf/condition and squashes the following commits: b2a044a [scwf] merge SecurityManager e16239c [scwf] fix confilct 6811401 [scwf] fix merge confilct 0824df4 [scwf] Merge branch 'master' of https://github.com/apache/spark into patch-4 e274515 [scwf] fix redundant conditions d032bf9 [wangfei] [SQL]Excess judgment
https://issues.apache.org/jira/browse/SPARK-3010
this pr is to fix 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
...