flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2725) Max/Min/Sum Aggregation of mutable types
Date Fri, 09 Oct 2015 14:25:26 GMT

    [ https://issues.apache.org/jira/browse/FLINK-2725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14950465#comment-14950465
] 

ASF GitHub Bot commented on FLINK-2725:
---------------------------------------

Github user greghogan commented on a diff in the pull request:

    https://github.com/apache/flink/pull/1191#discussion_r41635292
  
    --- Diff: flink-java/src/main/java/org/apache/flink/api/java/typeutils/ValueTypeInfo.java
---
    @@ -51,7 +51,18 @@
     public class ValueTypeInfo<T extends Value> extends TypeInformation<T> implements
AtomicType<T> {
     
     	private static final long serialVersionUID = 1L;
    -	
    +
    +	public static final ValueTypeInfo<BooleanValue> BOOLEAN_VALUE_TYPE_INFO = new
ValueTypeInfo<>(BooleanValue.class);
    +	public static final ValueTypeInfo<ByteValue> BYTE_VALUE_TYPE_INFO = new ValueTypeInfo<>(ByteValue.class);
    +	public static final ValueTypeInfo<CharValue> CHAR_VALUE_TYPE_INFO = new ValueTypeInfo<>(CharValue.class);
    +	public static final ValueTypeInfo<DoubleValue> DOUBLE_VALUE_TYPE_INFO = new ValueTypeInfo<>(DoubleValue.class);
    +	public static final ValueTypeInfo<FloatValue> FLOAT_VALUE_TYPE_INFO = new ValueTypeInfo<>(FloatValue.class);
    +	public static final ValueTypeInfo<IntValue> INT_VALUE_TYPE_INFO = new ValueTypeInfo<>(IntValue.class);
    +	public static final ValueTypeInfo<LongValue> LONG_VALUE_TYPE_INFO = new ValueTypeInfo<>(LongValue.class);
    +	public static final ValueTypeInfo<NullValue> NULL_VALUE_TYPE_INFO = new ValueTypeInfo<>(NullValue.class);
    +	public static final ValueTypeInfo<ShortValue> SHORT_VALUE_TYPE_INFO = new ValueTypeInfo<>(ShortValue.class);
    +	public static final ValueTypeInfo<StringValue> STRING_VALUE_TYPE_INFO = new ValueTypeInfo<>(StringValue.class);
    --- End diff --
    
    Yes, these follow the form of `BasicTypeInfo` (which, admittedly, are much longer instantiations).
These are used extensively in `ValueCollectionDataSets` for creation of `TupleTypeInfo` and
which mirrors `CollectionDataSets` which uses the `BasicTypeInfo` statics for the same purpose.
    
    I am surprised IntelliJ is marking public members as unused.


> Max/Min/Sum Aggregation of mutable types
> ----------------------------------------
>
>                 Key: FLINK-2725
>                 URL: https://issues.apache.org/jira/browse/FLINK-2725
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API
>    Affects Versions: 0.10
>            Reporter: Greg Hogan
>            Assignee: Greg Hogan
>            Priority: Minor
>
> Support mutable value types in min, max, and sum aggregations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message