From 29441a23b24f24ceb78727e5bfd8c64bfc1c1c3f Mon Sep 17 00:00:00 2001 From: Sebastian Baunsgaard Date: Wed, 23 Oct 2024 12:41:27 +0200 Subject: [PATCH] fix compile error --- .../runtime/frame/data/columns/ABooleanArray.java | 3 ++- .../sysds/runtime/frame/data/columns/DDCArray.java | 11 ++++++----- .../sysds/runtime/frame/data/columns/StringArray.java | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/apache/sysds/runtime/frame/data/columns/ABooleanArray.java b/src/main/java/org/apache/sysds/runtime/frame/data/columns/ABooleanArray.java index b202385c178..f729417d942 100644 --- a/src/main/java/org/apache/sysds/runtime/frame/data/columns/ABooleanArray.java +++ b/src/main/java/org/apache/sysds/runtime/frame/data/columns/ABooleanArray.java @@ -21,6 +21,7 @@ import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ExecutorService; public abstract class ABooleanArray extends Array { @@ -57,7 +58,7 @@ public boolean possiblyContainsNaN() { public abstract void setNullsFromString(int rl, int ru, Array value); @Override - protected Map createRecodeMap(int estimate) { + protected Map createRecodeMap(int estimate, ExecutorService pool) { Map map = new HashMap<>(); long id = 1; for(int i = 0; i < size() && id <= 2; i++) { 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 7556d52978e..9a82b3bdf6d 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 @@ -25,6 +25,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import java.util.concurrent.ExecutorService; import org.apache.sysds.common.Types.ValueType; import org.apache.sysds.runtime.DMLRuntimeException; @@ -175,8 +176,8 @@ public static Array compressToDDC(Array arr, int estimateUnique) { } @Override - protected Map createRecodeMap(int estimate) { - return dict.createRecodeMap(estimate); + protected Map createRecodeMap(int estimate, ExecutorService pool) { + return dict.createRecodeMap(estimate, pool); } @Override @@ -424,13 +425,13 @@ public ArrayCompressionStatistics statistics(int nSamples) { @Override public void setM(Map map, int si, AMapToData m, int i) { - try{ + try { if(dict instanceof OptionalArray) { OptionalArray opt = (OptionalArray) dict; T v = opt.getInternal(this.map.getIndex(i)); - if(v != null) + if(v != null) m.set(i, map.get(v).intValue() - 1); - else + else m.set(i, si); } else diff --git a/src/main/java/org/apache/sysds/runtime/frame/data/columns/StringArray.java b/src/main/java/org/apache/sysds/runtime/frame/data/columns/StringArray.java index b99666364fb..7e78b2ec22d 100644 --- a/src/main/java/org/apache/sysds/runtime/frame/data/columns/StringArray.java +++ b/src/main/java/org/apache/sysds/runtime/frame/data/columns/StringArray.java @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.ExecutorService; import org.apache.commons.lang3.NotImplementedException; import org.apache.sysds.common.Types.ValueType; @@ -674,7 +675,7 @@ public final boolean isNotEmpty(int i) { } @Override - protected Map createRecodeMap(int estimate) { + protected Map createRecodeMap(int estimate, ExecutorService pool) { try { Map map = new HashMap<>((int)Math.min((long)estimate *2, size())); for(int i = 0; i < size(); i++) { @@ -687,7 +688,7 @@ protected Map createRecodeMap(int estimate) { return map; } catch(Exception e) { - return super.createRecodeMap(estimate); + return super.createRecodeMap(estimate, pool); } }