GitHub user ktzoumas opened a pull request:
https://github.com/apache/incubator-flink/pull/17 Shallow copy, deep equality, and hashCode to Tuple classes Adds functionality to Tuple classes - Implementation of equals() and hashCode() - Copy constructor for creating shallow copies of tuples You can merge this pull request into a Git repository by running: $ git pull https://github.com/ktzoumas/incubator-flink tuple_equals_hashcode_shallowcopy Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-flink/pull/17.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 #17 ---- commit 7c7d1606c2e78ba984d9b4a644926a42adbf3bf5 Author: Kostas Tzoumas <[hidden email]> Date: 2014-06-13T15:40:24Z Shallow copy, deep equality, and hashCode to Tuple classes ---- --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
Github user uce commented on the pull request:
https://github.com/apache/incubator-flink/pull/17#issuecomment-46251005 PS: I think a `deepCopy` won't be possible in general, no? If this is correct, we could just name the method `copy` instead of `shallowCopy` and add the according comments. I'm also fine with both approaches. I just tried to imagine what _I_ (highly subjective :P) would look for as a user. But this is what the different approaches would look like in practice, right? ```java Tuple4<Integer, String, Double, Integer> toCopy = ... Tuple4<Integer, String, Double, Integer> theCopy = new Tuple4<Integer, String, Double, Integer>(toCopy) ``` vs. ```java Tuple4<Integer, String, Double, Integer> toCopy = ... Tuple4<Integer, String, Double, Integer> theCopy = toCopy.copy(); ``` --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by zentol
Github user ktzoumas commented on the pull request:
https://github.com/apache/incubator-flink/pull/17#issuecomment-46274123 Yes, a deepCopy is not something that we want to do. I will do as you say, the type parameters convinced me :-) --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by zentol
Github user StephanEwen commented on the pull request:
https://github.com/apache/incubator-flink/pull/17#issuecomment-46466667 The tuple classes now have a private copy constructor that is never used. --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
In reply to this post by zentol
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-flink/pull/17 --- 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 [hidden email] or file a JIRA ticket with INFRA. --- |
Free forum by Nabble | Edit this page |