Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
Baunsgaard committed Oct 23, 2024
1 parent 82ab7ea commit 29441a2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutorService;

public abstract class ABooleanArray extends Array<Boolean> {

Expand Down Expand Up @@ -57,7 +58,7 @@ public boolean possiblyContainsNaN() {
public abstract void setNullsFromString(int rl, int ru, Array<String> value);

@Override
protected Map<Boolean, Long> createRecodeMap(int estimate) {
protected Map<Boolean, Long> createRecodeMap(int estimate, ExecutorService pool) {
Map<Boolean, Long> map = new HashMap<>();
long id = 1;
for(int i = 0; i < size() && id <= 2; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -175,8 +176,8 @@ public static <T> Array<T> compressToDDC(Array<T> arr, int estimateUnique) {
}

@Override
protected Map<T, Long> createRecodeMap(int estimate) {
return dict.createRecodeMap(estimate);
protected Map<T, Long> createRecodeMap(int estimate, ExecutorService pool) {
return dict.createRecodeMap(estimate, pool);
}

@Override
Expand Down Expand Up @@ -424,13 +425,13 @@ public ArrayCompressionStatistics statistics(int nSamples) {

@Override
public void setM(Map<T, Long> map, int si, AMapToData m, int i) {
try{
try {
if(dict instanceof OptionalArray) {
OptionalArray<T> opt = (OptionalArray<T>) 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -674,7 +675,7 @@ public final boolean isNotEmpty(int i) {
}

@Override
protected Map<String, Long> createRecodeMap(int estimate) {
protected Map<String, Long> createRecodeMap(int estimate, ExecutorService pool) {
try {
Map<String, Long> map = new HashMap<>((int)Math.min((long)estimate *2, size()));
for(int i = 0; i < size(); i++) {
Expand All @@ -687,7 +688,7 @@ protected Map<String, Long> createRecodeMap(int estimate) {
return map;
}
catch(Exception e) {
return super.createRecodeMap(estimate);
return super.createRecodeMap(estimate, pool);
}
}

Expand Down

0 comments on commit 29441a2

Please sign in to comment.