flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s1ck <...@git.apache.org>
Subject [GitHub] flink pull request #2527: [FLINK-4624] Allow for null values in Graph Summar...
Date Fri, 23 Sep 2016 06:06:28 GMT
Github user s1ck commented on a diff in the pull request:

    --- Diff: flink-libraries/flink-gelly/src/main/java/org/apache/flink/graph/library/Summarization.java
    @@ -226,11 +247,15 @@ public void setGroupRepresentativeId(K groupRepresentativeId) {
     		public VGV getVertexGroupValue() {
    -			return f2;
    +			return f2.isLeft() ? f2.left() : null;
     		public void setVertexGroupValue(VGV vertexGroupValue) {
    -			f2 = vertexGroupValue;
    +			if (vertexGroupValue == null) {
    +				f2 = new Either.Right<>(NullValue.getInstance());
    --- End diff --
    An instance of `VertexGroupItem` is reused in the `VertexGroupReducer`. Here the setter
is implicitly only called once in the open method. So I thought reusing the new Right<>(NullValue.getInstance())
wouldn't be a benefit.

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.

View raw message