This is an automated email from the ASF dual-hosted git repository.

mboehm7 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/main by this push:
     new 913edde6f4 [MINOR] Fix federated tests and codegen components for 
fixed IDSequence
913edde6f4 is described below

commit 913edde6f47d14fd3bba016d1cd2fd7386dfc74e
Author: Matthias Boehm <[email protected]>
AuthorDate: Sat Nov 30 20:46:59 2024 +0100

    [MINOR] Fix federated tests and codegen components for fixed IDSequence
---
 src/main/java/org/apache/sysds/hops/codegen/template/TemplateUtils.java | 2 +-
 .../functions/federated/primitives/part2/FederatedNegativeTest.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/sysds/hops/codegen/template/TemplateUtils.java 
b/src/main/java/org/apache/sysds/hops/codegen/template/TemplateUtils.java
index 16d88c5a98..8305c10ca6 100644
--- a/src/main/java/org/apache/sysds/hops/codegen/template/TemplateUtils.java
+++ b/src/main/java/org/apache/sysds/hops/codegen/template/TemplateUtils.java
@@ -539,7 +539,7 @@ public class TemplateUtils
        
        public static boolean isValidNumVectorIntermediates(CNode node, CNode 
main, Map<Long, Set<Long>> parents, Map<Long, Pair<Long, MutableInt>> inUse, 
Set<Long> inUse2, int count) {
                if( count <= 1 ) return false;
-               IDSequence buff = new IDSequence(true, count-1); //zero based
+               IDSequence buff = new IDSequence(true, count-2); //-1 based
                inUse.clear(); inUse2.clear();
                node.resetVisitStatus();
                return rIsValidNumVectorIntermediates(node, main, parents, 
inUse, inUse2, buff);
diff --git 
a/src/test/java/org/apache/sysds/test/functions/federated/primitives/part2/FederatedNegativeTest.java
 
b/src/test/java/org/apache/sysds/test/functions/federated/primitives/part2/FederatedNegativeTest.java
index 8b92345ed7..c88747c5fc 100644
--- 
a/src/test/java/org/apache/sysds/test/functions/federated/primitives/part2/FederatedNegativeTest.java
+++ 
b/src/test/java/org/apache/sysds/test/functions/federated/primitives/part2/FederatedNegativeTest.java
@@ -64,7 +64,7 @@ public class FederatedNegativeTest {
                try {
                        FederatedResponse fres = res[0].get();
                        assertFalse(fres.isSuccessful());
-                       assertTrue(fres.getErrorMessage().contains("Variable 1 
does not exist at federated worker"));
+                       assertTrue(fres.getErrorMessage().contains("Variable 0 
does not exist at federated worker"));
                }
                catch (Exception e) {
                        e.printStackTrace();

Reply via email to