You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/01/01 15:14:58 UTC
[jira] [Commented] (BEAM-1223) Add static factory methods for
Sum.[*]Fn classes
[ https://issues.apache.org/jira/browse/BEAM-1223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15791240#comment-15791240 ]
ASF GitHub Bot commented on BEAM-1223:
--------------------------------------
GitHub user staslev opened a pull request:
https://github.com/apache/beam/pull/1723
[BEAM-1223] Introduced Sum,Min,Max#ofLongs()/ofDoubles()/ofIntegers()…
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
- [ ] Make sure the PR title is formatted like:
`[BEAM-<Jira issue #>] Description of pull request`
- [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
- [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
number, if there is one.
- [ ] If this contribution is large, please file an Apache
[Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).
---
R: @lukecwik
About half way into this I was questioning the benefit-cost ratio, but since consistency is what this PR is all about I figured bailing out would not be appropriate.
Let me know how it looks.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/staslev/incubator-beam BEAM-1223-Add-static-factory-methods-for-CombineFn-classes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/1723.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 #1723
----
commit 70f8db4021b7c9e49a280edb740667ae67224ef7
Author: Stas Levin <st...@gmail.com>
Date: 2017-01-01T11:58:32Z
[BEAM-1223] Introduced Sum,Min,Max#ofLongs()/ofDoubles()/ofIntegers() and eliminated the direction instantiation of the corresponding classes.
----
> Add static factory methods for Sum.[*]Fn classes
> ------------------------------------------------
>
> Key: BEAM-1223
> URL: https://issues.apache.org/jira/browse/BEAM-1223
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-core
> Reporter: Stas Levin
> Assignee: Stas Levin
> Priority: Minor
>
> {{Sum.SumDoubleFn}}, {{SumIntegerFn}} and {{SumLongFn}} are not using the {{X.of()}} or {{X.from()}} or other instance creation via static method patterns that are ubiquitous in Beam.
> Following a discussion on the dev list, it would be great to preserve a consistent look and feel and change the creation patterns for these classes to something like {{SumFn.ofLong()}} etc.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)