Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import java.util.Collections;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.commons.lang3.NotImplementedException;
import org.apache.commons.logging.Log;
Expand Down Expand Up @@ -92,6 +94,9 @@
public class ColGroupTest extends ColGroupBase {
protected static final Log LOG = LogFactory.getLog(ColGroupTest.class.getName());

/** Tracks already-logged "not implemented" column group type pairs to avoid duplicate log spam. */
private static final Set<String> loggedNotImplemented = ConcurrentHashMap.newKeySet();

public ColGroupTest(AColGroup base, AColGroup other, int nRow) {
super(base, other, nRow);
}
Expand Down Expand Up @@ -1282,14 +1287,20 @@ public void leftMultNoPreAgg(int nRowLeft, int rl, int ru, int cl, int cu, Matri
compare(bt, ot);
}
catch(NotImplementedException e) {
LOG.error("not implemented: " + base.getClass().getSimpleName() + " or: " + other.getClass().getSimpleName());
logNotImplementedOnce();
}
catch(Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}

private void logNotImplementedOnce() {
final String pair = base.getClass().getSimpleName() + " or: " + other.getClass().getSimpleName();
if(loggedNotImplemented.add(pair))
LOG.error("not implemented: " + pair);
}

@Test
public void sparseSelection() {
MatrixBlock mb = CLALibSelectionMultTest.createSelectionMatrix(nRow, 5, false);
Expand Down
Loading