io.deephaven.engine.table.impl.StaticAsOfJoinStateManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of deephaven-engine-table Show documentation
Show all versions of deephaven-engine-table Show documentation
Engine Table: Implementation and closely-coupled utilities
/**
* Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
*/
package io.deephaven.engine.table.impl;
import io.deephaven.engine.table.ColumnSource;
import java.util.Arrays;
import java.util.Objects;
import java.util.stream.Collectors;
public abstract class StaticAsOfJoinStateManager {
protected final ColumnSource>[] keySourcesForErrorMessages;
protected StaticAsOfJoinStateManager(ColumnSource>[] keySourcesForErrorMessages) {
this.keySourcesForErrorMessages = keySourcesForErrorMessages;
}
// produce a pretty key for error messages
protected String extractKeyStringFromSourceTable(long leftKey) {
if (keySourcesForErrorMessages.length == 1) {
return Objects.toString(keySourcesForErrorMessages[0].get(leftKey));
}
return "[" + Arrays.stream(keySourcesForErrorMessages).map(ls -> Objects.toString(ls.get(leftKey))).collect(Collectors.joining(", ")) + "]";
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy