You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Kevin Innerebner (Jira)" <ji...@apache.org> on 2020/06/29 14:08:00 UTC
[jira] [Updated] (SYSTEMDS-2565) FrameBlock read and write
[ https://issues.apache.org/jira/browse/SYSTEMDS-2565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Innerebner updated SYSTEMDS-2565:
---------------------------------------
Description:
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.
The problem arises in the FrameBlock.write() method:
{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.
was:
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.
> FrameBlock read and write
> -------------------------
>
> Key: SYSTEMDS-2565
> URL: https://issues.apache.org/jira/browse/SYSTEMDS-2565
> Project: SystemDS
> Issue Type: Bug
> Reporter: Kevin Innerebner
> Priority: Minor
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> 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.
> The problem arises in the FrameBlock.write() method:
> {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)