Skip to content

Commit d3fcfb1

Browse files
committed
[SYSTEMDS-3807] Fix test code coverage and minor lineage issues
Recently ubuntu-latest changed to ubuntu-24 which changed the default java version from 11 to 17. This seems to cause problems, even when fixing the java version to 11. So in order to restore the code coverage support, we now fix ubuntu-22 until we can rebuild our docker image.
1 parent 091144d commit d3fcfb1

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

.github/workflows/javaTests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
strategy:
4949
fail-fast: false
5050
matrix:
51-
os: [ubuntu-latest]
51+
os: [ubuntu-22.04]
5252
tests: [
5353
"org.apache.sysds.test.applications.**",
5454
"**.test.usertest.**",
@@ -124,7 +124,7 @@ jobs:
124124
strategy:
125125
fail-fast: false
126126
matrix:
127-
os: [ubuntu-latest]
127+
os: [ubuntu-22.04]
128128
java: ['11']
129129
javadist: ['adopt']
130130
steps:

src/main/java/org/apache/sysds/runtime/controlprogram/context/ExecutionContext.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -624,13 +624,10 @@ public void setMatrixOutputAndLineage(String varName, MatrixBlock outputData, Li
624624
mo.release();
625625
}
626626

627-
@SuppressWarnings("unused")
628627
public void setMatrixOutputAndLineage(String varName, Future<MatrixBlock> fmb, LineageItem li) {
629628
if (isAutoCreateVars() && !containsVariable(varName)) {
630-
//FIXME without adding this fmo object here to the symbol table
631-
// it would crash in federated operations (autocreatevars)
632-
MatrixObject fmo = new MatrixObjectFuture(Types.ValueType.FP64,
633-
OptimizerUtils.getUniqueTempFileName(), fmb);
629+
setVariable(varName, new MatrixObjectFuture(Types.ValueType.FP64,
630+
OptimizerUtils.getUniqueTempFileName(), fmb));
634631
}
635632
MatrixObject mo = getMatrixObject(varName);
636633
MatrixObjectFuture fmo = new MatrixObjectFuture(mo, fmb);

src/main/java/org/apache/sysds/runtime/instructions/cp/ParameterizedBuiltinCPInstruction.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -420,14 +420,7 @@ else if(cacheData instanceof FrameObject) {
420420
}
421421
else if(cacheData instanceof ListObject) {
422422
out = DataConverter.toString((ListObject) cacheData,
423-
rows,
424-
cols,
425-
sparse,
426-
separator,
427-
lineSeparator,
428-
rows,
429-
cols,
430-
decimal);
423+
rows, cols, sparse, separator, lineSeparator, rows, cols, decimal);
431424
}
432425
else {
433426
throw new DMLRuntimeException("toString only converts "
@@ -549,9 +542,7 @@ else if(opcode.equalsIgnoreCase("lowertri") || opcode.equalsIgnoreCase("uppertri
549542
else if(opcode.equalsIgnoreCase("transformdecode") || opcode.equalsIgnoreCase("transformapply")) {
550543
CPOperand target = new CPOperand(params.get("target"), ValueType.FP64, DataType.FRAME);
551544
CPOperand meta = getLiteral("meta", ValueType.UNKNOWN, DataType.FRAME);
552-
CPOperand spec = getStringLiteral("spec");
553-
//FIXME: Taking only spec file name as a literal leads to wrong reuse
554-
//TODO: Add Embedding to the lineage item
545+
CPOperand spec = new CPOperand(params.get("spec"), ValueType.STRING, DataType.SCALAR);
555546
return Pair.of(output.getName(),
556547
new LineageItem(getOpcode(), LineageItemUtils.getLineage(ec, target, meta, spec)));
557548
}

0 commit comments

Comments
 (0)