[
https://issues.apache.org/jira/browse/FLINK-3695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15385905#comment-15385905
]
Greg Hogan commented on FLINK-3695:
-----------------------------------
[~StephanEwen] I was looking to use primitive arrays rather than object arrays
so that the data stays in contiguous memory. Something like
{code}
public interface ValueArray<T> extends Iterable<T>, IOReadableWritable,
Serializable, ResettableValue<ValueArray<T>>, CopyableValue<ValueArray<T>> {
void clear();
void add(T value);
}
public class LongValueArray implements ValueArray<LongValue> {
private long[] data;
private int position;
@Override
public void clear() {
position = 0;
}
@Override
public void add(LongValue value) {
data[position++] = value.getValue();
}
...
}
{code}
> ValueArray types
> ----------------
>
> Key: FLINK-3695
> URL: https://issues.apache.org/jira/browse/FLINK-3695
> Project: Flink
> Issue Type: New Feature
> Components: Type Serialization System
> Affects Versions: 1.1.0
> Reporter: Greg Hogan
> Assignee: Greg Hogan
> Priority: Minor
>
> Flink provides mutable {{Value}} type implementations of Java primitives
> along with efficient serializers and comparators. It would be useful to have
> corresponding {{ValueArray}} implementations backed by primitive rather than
> object arrays, along with an {{ArrayableValue}} interface tying a {{Value}}
> to its {{ValueArray}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)