[
https://issues.apache.org/jira/browse/FLINK-2637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14791822#comment-14791822
]
ASF GitHub Bot commented on FLINK-2637:
---------------------------------------
Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/1134#discussion_r39725082
--- Diff:
flink-core/src/main/java/org/apache/flink/api/common/typeinfo/IntegerTypeInfo.java
---
@@ -18,15 +18,33 @@
package org.apache.flink.api.common.typeinfo;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
import org.apache.flink.api.common.typeutils.TypeComparator;
import org.apache.flink.api.common.typeutils.TypeSerializer;
+import java.util.Set;
+
/**
- * Type information for numeric primitive types (int, long, double, byte,
...).
+ * Type information for numeric integer primitive types: int, long, byte,
short, boolean, character.
*/
public class IntegerTypeInfo<T> extends NumericTypeInfo<T> {
+ private static final long serialVersionUID = -8068827354966766955L;
+
+ private static final Set<Class<?>> integerTypes =
Sets.<Class<?>>newHashSet(
+ Integer.class,
+ Long.class,
+ Byte.class,
+ Short.class,
+ Boolean.class,
--- End diff --
Nope, I missed that. Will remove it.
> Add abstract equals, hashCode and toString methods to TypeInformation
> ---------------------------------------------------------------------
>
> Key: FLINK-2637
> URL: https://issues.apache.org/jira/browse/FLINK-2637
> Project: Flink
> Issue Type: Improvement
> Components: Core
> Affects Versions: 0.9, 0.10
> Reporter: Fabian Hueske
> Assignee: Till Rohrmann
> Labels: starter
> Fix For: 0.10
>
>
> Flink expects that implementations of {{TypeInformation}} have valid
> implementations of {{hashCode}} and {{equals}}. However, the API does not
> enforce to implement these methods. Hence, this is a common origin for bugs
> such as for example FLINK-2633.
> This can be avoided by adding abstract {{hashCode}} and {{equals}} methods to
> TypeInformation. An abstract {{toString}} method could also be added.
> This change will brake the API and require to fix a couple of broken
> {{TypeInformation}} implementations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)