From 1f9c468529ab9a5b69fba4f71e4c1db046e2815c Mon Sep 17 00:00:00 2001 From: Sebastian Baunsgaard Date: Tue, 22 Oct 2024 02:21:27 +0200 Subject: [PATCH] fix --- .../apache/sysds/runtime/frame/data/columns/DDCArray.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/sysds/runtime/frame/data/columns/DDCArray.java b/src/main/java/org/apache/sysds/runtime/frame/data/columns/DDCArray.java index 4d01e1e9ec7..d5a9c9d6906 100644 --- a/src/main/java/org/apache/sysds/runtime/frame/data/columns/DDCArray.java +++ b/src/main/java/org/apache/sysds/runtime/frame/data/columns/DDCArray.java @@ -438,19 +438,19 @@ else if (dict instanceof OptionalArray){ OptionalArray opt = (OptionalArray) dict; if(opt._n.get(i)){ - if(dict instanceof HashIntegerArray) + if(opt._a instanceof HashIntegerArray) m.set(i, map.get(((HashIntegerArray)opt._a).getInt(this.map.getIndex(i))).intValue()-1); - else if (dict instanceof HashLongArray) + else if (opt._a instanceof HashLongArray) m.set(i, map.get(((HashLongArray)opt._a).getLong(this.map.getIndex(i))).intValue()-1); else - super.setM(map, si, m, i); + m.set(i, map.get(opt._a.get(this.map.getIndex(i))).intValue()-1); } else { m.set(i, si); } } else - super.setM(map, si, m, i); + m.set(i, map.get(dict.get(this.map.getIndex(i))).intValue()-1); } @Override