Kevin Innerebner created SYSTEMML-2565:
------------------------------------------
Summary: FrameBlock read and write
Key: SYSTEMML-2565
URL: https://issues.apache.org/jira/browse/SYSTEMML-2565
Project: SystemDS
Issue Type: Bug
Reporter: Kevin Innerebner
FrameBlocks fail (null pointer access) to be serialized in cases where their
_coldata is null. This is reproducable:
{code:java}
// ... code
FrameBlock fb = new FrameBlock(data.getNumColumns(), Types.ValueType.STRING);
fb.write(do);
{code}
Note that this is an internal error, so I am not sure if this can happen while
executing a dml script.
By calling FrameBlock.ensureAllocatedColumns(rows) before writing this can be
stopped from happening and I am not aware of instances where this lead to
problems at the moment.
{code:java}
// ... code
//write columns (value type, data)
for( int j=0; j<getNumColumns(); j++ ) {
out.writeByte(_schema[j].ordinal());
if( !isDefaultMeta ) {
out.writeUTF(getColumnName(j));
out.writeLong(_colmeta[j].getNumDistinct());
out.writeUTF( (_colmeta[j].getMvValue()!=null) ?
_colmeta[j].getMvValue() : "" );
}
_coldata[j].write(out);
}
{code}
The problem is the line:
{code:java}
_coldata[j].write(out);
{code}
Although we have columns _coldata is still null.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)