-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYSTEMDS-3589] Frame single column ragged array #1857
Conversation
I don't fully understand the use case of a ragged array-based frame. Is the metatadata from a |
The ragged array is intended to save mem since the metadata frame is mostly nulls. We probably do not want to change the API of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good start, some details missing.
src/main/java/org/apache/sysds/runtime/frame/data/columns/RaggedArray.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/sysds/runtime/frame/data/columns/RaggedArray.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
@Override | ||
public Object get() { | ||
throw new NotImplementedException("Unimplemented method 'get'"); | ||
return _a.get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw exception on this one. since the API expects to get the full array of size m.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. However, OptionalArray.get returns an Object and it makes sense to me.
src/main/java/org/apache/sysds/runtime/frame/data/columns/RaggedArray.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/sysds/runtime/frame/data/columns/RaggedArray.java
Show resolved
Hide resolved
} | ||
|
||
@Override | ||
public byte[] getAsByteArray() { | ||
throw new NotImplementedException("Unimplemented method 'getAsByteArray'"); | ||
return _a.getAsByteArray(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw some exception here. this will not work, since the caller expects the byte array to be certain m size * nBytes per value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, I believe that optional should also throw an exception to be consistent?
Since currently it is not the case:
public byte[] getAsByteArray() {
// technically not correct.
return _a.getAsByteArray();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes optional should throw exception as well.
} | ||
|
||
@Override | ||
public long getExactSerializedSize() { | ||
throw new NotImplementedException("Unimplemented method 'getExactSerializedSize'"); | ||
return _a.getExactSerializedSize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- int size.
src/main/java/org/apache/sysds/runtime/frame/data/columns/RaggedArray.java
Show resolved
Hide resolved
src/main/java/org/apache/sysds/runtime/frame/data/columns/RaggedArray.java
Show resolved
Hide resolved
src/test/java/org/apache/sysds/test/component/frame/array/FrameArrayTests.java
Show resolved
Hide resolved
This commit contains code to add a simple ragged array, that allows us to allocate columns in frames with a lower number of contained materialized values. Closes apache#1857
Thanks for the commit, i am merging and fixing remaining issues in other PR. |
This PR adds a ragged array for a single column containing row values. It is just a wrapper around actual frame column Arrays.
It can be used for the
transformencode
metadata frames.Thanks for the review.