Skip to content

Commit f16abe9

Browse files
committed
fix merge Recode
1 parent 0458808 commit f16abe9

File tree

2 files changed

+11
-3
lines changed
  • src
    • main/java/org/apache/sysds/runtime/frame/data/columns
    • test/java/org/apache/sysds/performance

2 files changed

+11
-3
lines changed

src/main/java/org/apache/sysds/runtime/frame/data/columns/Array.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,11 @@ private HashMapToInt<T> parallelCreateRecodeMap(int estimate, ExecutorService po
205205
* @param target The target object to merge the two maps into
206206
* @param from The Map to take entries from.
207207
*/
208-
protected static <T> void mergeRecodeMaps(Map<T, Integer> target, Map<T, Integer> from) {
208+
protected static <T> void mergeRecodeMaps(HashMapToInt<T> target, HashMapToInt<T> from) {
209209
final List<T> fromEntriesOrdered = new ArrayList<>(Collections.nCopies(from.size(), null));
210-
for(Map.Entry<T, Integer> e : from.entrySet())
211-
fromEntriesOrdered.set(e.getValue() - 1, e.getKey());
210+
from.forEach((k,v) -> {
211+
fromEntriesOrdered.set(v - 1, k);
212+
});
212213
int id = target.size();
213214
for(T e : fromEntriesOrdered) {
214215
if(target.putIfAbsent(e, id) == null)

src/test/java/org/apache/sysds/performance/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,10 @@ Binary Operations
8282
```bash
8383
java -jar -agentpath:$HOME/Programs/profiler/lib/libasyncProfiler.so=start,event=cpu,file=temp/log.html -XX:+UseNUMA target/systemds-3.3.0-SNAPSHOT-perf.jar 1006 500
8484
```
85+
86+
87+
transform encode
88+
89+
```bash
90+
java -jar -agentpath:$HOME/Programs/profiler/lib/libasyncProfiler.so=start,event=cpu,file=temp/log.html -XX:+UseNUMA target/systemds-3.3.0-SNAPSHOT-perf.jar 1007
91+
```

0 commit comments

Comments
 (0)