You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Jeremy Lewi (JIRA)" <ji...@apache.org> on 2012/08/06 00:46:03 UTC
[jira] [Created] (AVRO-1136) Pair.equals returns false positives
Jeremy Lewi created AVRO-1136:
---------------------------------
Summary: Pair.equals returns false positives
Key: AVRO-1136
URL: https://issues.apache.org/jira/browse/AVRO-1136
Project: Avro
Issue Type: Bug
Components: java
Affects Versions: 1.6.1
Reporter: Jeremy Lewi
Priority: Minor
Here is a test that fails and indicates the bug. pair1.equals(pair2) should return false because the values aren't the same but it returns true causing the test to fail. This appears to be a bug in both 1.6.1 and 1.7.1.
package contrail.avro;
import static org.junit.Assert.*;
import org.apache.avro.mapred.Pair;
import org.junit.Test;
public class TestAssertEquals {
@Test
public void test() {
Pair<Integer, Integer> pair1 = new Pair<Integer, Integer>(1, 2);
Pair<Integer, Integer> pair2 = new Pair<Integer, Integer>(1, 1);
assertFalse(pair1.equals(pair2));
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AVRO-1136) Pair.equals returns false positives
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429331#comment-13429331 ]
Doug Cutting commented on AVRO-1136:
------------------------------------
This is by design. Pair is intended for key/value pairs that are ordered by key only.
Perhaps we should make this clearer in the documentation?
> Pair.equals returns false positives
> -----------------------------------
>
> Key: AVRO-1136
> URL: https://issues.apache.org/jira/browse/AVRO-1136
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.6.1
> Reporter: Jeremy Lewi
> Priority: Minor
>
> Here is a test that fails and indicates the bug. pair1.equals(pair2) should return false because the values aren't the same but it returns true causing the test to fail. This appears to be a bug in both 1.6.1 and 1.7.1.
> package contrail.avro;
> import static org.junit.Assert.*;
> import org.apache.avro.mapred.Pair;
> import org.junit.Test;
> public class TestAssertEquals {
> @Test
> public void test() {
> Pair<Integer, Integer> pair1 = new Pair<Integer, Integer>(1, 2);
> Pair<Integer, Integer> pair2 = new Pair<Integer, Integer>(1, 1);
> assertFalse(pair1.equals(pair2));
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AVRO-1136) Pair.equals returns false positives
Posted by "Jeremy Lewi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429367#comment-13429367 ]
Jeremy Lewi commented on AVRO-1136:
-----------------------------------
Thanks for the explanation. It couldn't hurt to point this out in the documentation but I can't think of where.
> Pair.equals returns false positives
> -----------------------------------
>
> Key: AVRO-1136
> URL: https://issues.apache.org/jira/browse/AVRO-1136
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.6.1
> Reporter: Jeremy Lewi
> Priority: Minor
>
> Here is a test that fails and indicates the bug. pair1.equals(pair2) should return false because the values aren't the same but it returns true causing the test to fail. This appears to be a bug in both 1.6.1 and 1.7.1.
> package contrail.avro;
> import static org.junit.Assert.*;
> import org.apache.avro.mapred.Pair;
> import org.junit.Test;
> public class TestAssertEquals {
> @Test
> public void test() {
> Pair<Integer, Integer> pair1 = new Pair<Integer, Integer>(1, 2);
> Pair<Integer, Integer> pair2 = new Pair<Integer, Integer>(1, 1);
> assertFalse(pair1.equals(pair2));
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AVRO-1136) Pair.equals returns false positives
Posted by "Jeremy Lewi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AVRO-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jeremy Lewi resolved AVRO-1136.
-------------------------------
Resolution: Won't Fix
Works as intended.
> Pair.equals returns false positives
> -----------------------------------
>
> Key: AVRO-1136
> URL: https://issues.apache.org/jira/browse/AVRO-1136
> Project: Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.6.1
> Reporter: Jeremy Lewi
> Priority: Minor
>
> Here is a test that fails and indicates the bug. pair1.equals(pair2) should return false because the values aren't the same but it returns true causing the test to fail. This appears to be a bug in both 1.6.1 and 1.7.1.
> package contrail.avro;
> import static org.junit.Assert.*;
> import org.apache.avro.mapred.Pair;
> import org.junit.Test;
> public class TestAssertEquals {
> @Test
> public void test() {
> Pair<Integer, Integer> pair1 = new Pair<Integer, Integer>(1, 2);
> Pair<Integer, Integer> pair2 = new Pair<Integer, Integer>(1, 1);
> assertFalse(pair1.equals(pair2));
> }
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira