Skip to content

Commit 4758bce

Browse files
committed
only add nnz if combined
1 parent 4172e64 commit 4758bce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/apache/sysds/runtime/transform/encode/CompressedEncode.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ private <T> AColGroup passThroughNormal(ColumnEncoderComposite c, final IColInde
401401

402402
if(a.getValueType() != ValueType.BOOLEAN // if not booleans
403403
&& (stats == null || !stats.shouldCompress || stats.valueType != a.getValueType())) {
404-
return new ColGroupUncompressedArray(a, c._colID - 1,colIndexes);
404+
return new ColGroupUncompressedArray(a, c._colID - 1, colIndexes);
405405
}
406406
else {
407407
boolean containsNull = a.containsNull();
@@ -616,9 +616,10 @@ private void combineUncompressed(CompressedMatrixBlock mb) {
616616
else
617617
ret.add(g);
618618
}
619-
if(ucg.size() > 0)
619+
if(ucg.size() > 0){
620620
ret.add(combine(ucg));
621-
nnz.addAndGet(ret.get(ret.size()-1).getNumberNonZeros(in.getNumRows()));
621+
nnz.addAndGet(ret.get(ret.size()-1).getNumberNonZeros(in.getNumRows()));
622+
}
622623
mb.allocateColGroupList(ret);
623624
}
624625

0 commit comments

Comments
 (0)