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 2015/09/22 18:13:40 UTC

[GitHub] flink pull request: [FLINK-2723] CopyableValue method to copy into...

GitHub user greghogan opened a pull request:

    https://github.com/apache/flink/pull/1169

    [FLINK-2723] CopyableValue method to copy into new instance

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/greghogan/flink 2723_copyablevalue_method_to_copy_into_new_instance

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1169.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 #1169
    
----
commit 114c4960518f58e724bad13daae76c3f513d27b0
Author: Greg Hogan <co...@greghogan.com>
Date:   2015-09-21T19:14:09Z

    [FLINK-2723] CopyableValue method to copy into new instance

----


---
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-2723] CopyableValue method to copy into...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/1169


---
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-2723] CopyableValue method to copy into...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on the pull request:

    https://github.com/apache/flink/pull/1169#issuecomment-142439086
  
    Nice. And good explanation for the change. +1 to merge.
    
    Optionally: While at it, it might be helpful to add two short Javadoc comments to `copy` and `copyTo`.


---
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-2723] CopyableValue method to copy into...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/1169#issuecomment-142342692
  
    Looks good.
    
    This is API-breaking, we need to tag it as such and add it to the wiki page collecting API-breaking changes for the next release.


---
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-2723] CopyableValue method to copy into...

Posted by uce <gi...@git.apache.org>.
Github user uce commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1169#discussion_r40149941
  
    --- Diff: flink-core/src/test/java/org/apache/flink/types/CopyableValueTest.java ---
    @@ -0,0 +1,121 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.flink.types;
    +
    +import static org.junit.Assert.*;
    +
    +import org.junit.Test;
    +
    +public class CopyableValueTest {
    +
    +	@Test
    +	public void testCopy() {
    +		CopyableValue<?>[] value_types = new CopyableValue[] {
    +			new BooleanValue(true),
    +			new ByteValue((byte) 42),
    +			new CharValue('q'),
    +			new DoubleValue(3.1415926535897932),
    +			new FloatValue((float) 3.14159265),
    +			new IntValue(42),
    +			new LongValue(42l),
    +			new NullValue(),
    +			new ShortValue((short) 42),
    +			new StringValue("QED")
    +		};
    +
    +		try {
    +			for (CopyableValue<?> type : value_types) {
    +				assertEquals(type, type.copy());
    +			}
    +		}
    +		catch (Exception e) {
    +			e.printStackTrace();
    +			fail(e.getMessage());
    +		}
    --- End diff --
    
    I know that we have this in other tests as well, but I think it is not needed, because the test will fail with the stack trace anyways.


---
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-2723] CopyableValue method to copy into...

Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on the pull request:

    https://github.com/apache/flink/pull/1169#issuecomment-142649055
  
    @uce Updated with comments and cleaner test code per your recommendation.


---
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-2723] CopyableValue method to copy into...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/1169#issuecomment-144015414
  
    Merging this...


---
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.
---