You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by greghogan <gi...@git.apache.org> on 2016/04/08 23:15:12 UTC
[GitHub] flink pull request: [FLINK-3721] Min and max accumulators
GitHub user greghogan opened a pull request:
https://github.com/apache/flink/pull/1866
[FLINK-3721] Min and max accumulators
Flink already contains DoubleCounter, IntCounter, and LongCounter for adding numbers. This adds equivalent accumulators for storing the minimum and maximum double, int, and long values.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/greghogan/flink 3721_min_and_max_accumulators
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/1866.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1866
----
commit fb413e766d84ba96b4f699fd7597c89082121625
Author: Greg Hogan <co...@greghogan.com>
Date: 2016-04-08T19:06:39Z
[FLINK-3721] Min and max accumulators
Flink already contains DoubleCounter, IntCounter, and LongCounter for
adding numbers. This adds equivalent accumulators for storing the
minimum and maximum double, int, and long values.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request: [FLINK-3721] Min and max accumulators
Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on the pull request:
https://github.com/apache/flink/pull/1866#issuecomment-208409014
@StephanEwen thanks for the links.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request: [FLINK-3721] Min and max accumulators
Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on the pull request:
https://github.com/apache/flink/pull/1866#issuecomment-209074937
Merging ...
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request: [FLINK-3721] Min and max accumulators
Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/1866#issuecomment-208312329
Looks good. One optimization suggestion: Replace
```java
if (value > this.max) {
this.max = value;
}
```
by
```java
this.max = Math.max(this.max, value);
```
That is a branch-free variant, because (as far as I know) these Math functions are JIT intrinsics and become special assembler instructions in the end.
(See: http://www.slideshare.net/RednaxelaFX/green-teajug-hotspotintrinsics02232013 and http://hg.openjdk.java.net/jdk8/jdk8/hotspot/file/87ee5ee27509/src/share/vm/classfile/vmSymbols.hpp)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request: [FLINK-3721] Min and max accumulators
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/1866
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---