-
Notifications
You must be signed in to change notification settings - Fork 28.9k
SPARK-1925: Replace '&' with '&&' #879
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
|
Can one of the admins verify this patch? |
|
There is another instance of this on line 457. |
|
Good catch. Already fixed it. Thanks! |
|
Speaking of this operator, one day I was watching Josh Bloch give a presentation about the dark corners of Java, and he was covering short-circuit boolean operations. He mentioned in passing that sometimes they are faster. I had to stop him to ask how it could ever be faster to always evaluate both conditions. His reply was that it saved the branch that decided whether to evaluate the second condition, at the expense of having to always evaluate it of course. When the first condition was frequently false, could be faster to let the processor do the out-of-order evaluation rather than wait. He said this was only rarely useful, and we should always be defaulting to |
|
Nice explanation:) Thank you, @srowen |
|
Jenkins, test this please. |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. |
|
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/15211/ |
|
Jenkins, retest this please. |
|
Merged build triggered. |
|
Merged build started. |
|
Merged build finished. All automated tests passed. |
|
All automated tests passed. |
|
Thanks. I've merged this into master & branch-1.0. |
JIRA: https://issues.apache.org/jira/browse/SPARK-1925 Author: zsxwing <[email protected]> Closes #879 from zsxwing/SPARK-1925 and squashes the following commits: 5cf5a6d [zsxwing] SPARK-1925: Replace '&' with '&&' (cherry picked from commit cb7fe50) Signed-off-by: Reynold Xin <[email protected]>
JIRA: https://issues.apache.org/jira/browse/SPARK-1925 Author: zsxwing <[email protected]> Closes apache#879 from zsxwing/SPARK-1925 and squashes the following commits: 5cf5a6d [zsxwing] SPARK-1925: Replace '&' with '&&'
JIRA: https://issues.apache.org/jira/browse/SPARK-1925 Author: zsxwing <[email protected]> Closes apache#879 from zsxwing/SPARK-1925 and squashes the following commits: 5cf5a6d [zsxwing] SPARK-1925: Replace '&' with '&&'
…lan (#879) * [SPARK-37199][SQL] Add deterministic field to QueryPlan ### What changes were proposed in this pull request? We have a deterministic field in Expressions to check if an expression is deterministic, but we do not have a similar field in QueryPlan. We have a need for such a check in the QueryPlan sometimes, like in InlineCTE This proposal is to add a deterministic field to QueryPlan. More details in this document: https://docs.google.com/document/d/1eIiaSJf-Co2HhjsaQxFNGwUxobnHID4ZGmJMcVytREc/edit#heading=h.4cz970y1mk93 ### Why are the changes needed? We have a need for such a check in the QueryPlan sometimes, like in InlineCTE ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Added unit tests Closes #34470 from somani/isDeterministic. Authored-by: Abhishek Somani <[email protected]> Signed-off-by: Wenchen Fan <[email protected]> (cherry picked from commit fe41d18) * Fix test error Co-authored-by: Abhishek Somani <[email protected]>
JIRA: https://issues.apache.org/jira/browse/SPARK-1925