Skip to content

Commit

Permalink
Merge branch 'main' into sm-string-opt
Browse files Browse the repository at this point in the history
  • Loading branch information
malhotrashivam committed Jun 6, 2024
2 parents f1bdc16 + 6711cd1 commit 732e907
Show file tree
Hide file tree
Showing 549 changed files with 9,689 additions and 6,794 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io.deephaven.engine.table.ColumnDefinition;
import io.deephaven.engine.table.Table;
import io.deephaven.engine.table.TableDefinition;
import io.deephaven.parquet.table.ParquetInstructions;
import io.deephaven.parquet.table.ParquetTools;
import io.deephaven.engine.util.TableTools;
import io.deephaven.engine.table.impl.util.TableBuilder;
Expand Down Expand Up @@ -48,7 +49,8 @@ public void logOutput() throws IOException {
.resolve(BenchmarkTools.getDetailOutputPath(benchmarkName) + PARQUET_FILE_EXTENSION);

final Table output = outputBuilder.build();
ParquetTools.writeTable(output, outputPath.toFile(), RESULT_DEF);
ParquetTools.writeTable(output, outputPath.toString(),
ParquetInstructions.EMPTY.withTableDefinition(RESULT_DEF));
}

public void reset() {
Expand Down Expand Up @@ -76,7 +78,7 @@ public long resultSize() {
}

public static Table readBin(File location) {
return ParquetTools.readTable(location);
return ParquetTools.readTable(location.getPath());
}

public String getResultHash() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import io.deephaven.util.QueryConstants;
import io.deephaven.chunk.Chunk;
import io.deephaven.chunk.LongChunk;
import org.apache.commons.lang3.mutable.MutableLong;
import io.deephaven.util.mutable.MutableLong;

import java.util.Arrays;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -224,24 +224,24 @@ public RowSet makeRowSet() {
RowSetUtils.forAllInvertedLongRanges(rowSet, nullsForCol, (first, last) -> {
if (first > 0) {
// Advance to (first - 1)
keysIterator.getNextRowSequenceWithLength(first - 1 - position.longValue());
keysIterator.getNextRowSequenceWithLength(first - 1 - position.get());
build.addKey(keysIterator.peekNextKey());
// Advance to first
keysIterator.getNextRowSequenceWithLength(1);
build.addKey(keysIterator.peekNextKey());

position.setValue(first);
position.set(first);
}

if (last < indexSize - 1) {
// Advance to last
keysIterator.getNextRowSequenceWithLength(last - position.longValue());
keysIterator.getNextRowSequenceWithLength(last - position.get());
build.addKey(keysIterator.peekNextKey());
// Advance to (last + 1)
keysIterator.getNextRowSequenceWithLength(1);
build.addKey(keysIterator.peekNextKey());

position.setValue(last + 1);
position.set(last + 1);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import io.deephaven.engine.testutil.testcase.RefreshingTableTestCase;
import io.deephaven.engine.util.TableTools;
import io.deephaven.engine.table.ColumnSource;
import org.apache.commons.lang3.mutable.MutableLong;
import io.deephaven.util.mutable.MutableLong;
import org.jetbrains.annotations.NotNull;

import java.util.concurrent.CountDownLatch;
Expand Down Expand Up @@ -192,7 +192,7 @@ public Long uniqueIdPrev(long index) {
@Override
public void loadData(MutableLong data, long index, boolean usePrev) {
final ColumnSource<Long> columnSource = table().getColumnSource("Value", long.class);
data.setValue(usePrev ? columnSource.getPrevLong(index) : columnSource.getLong(index));
data.set(usePrev ? columnSource.getPrevLong(index) : columnSource.getLong(index));
}
},
nKeys);
Expand Down
8 changes: 4 additions & 4 deletions Plot/src/main/java/io/deephaven/plot/util/PlotUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@
import io.deephaven.api.agg.Aggregation;
import io.deephaven.base.verify.Require;
import io.deephaven.datastructures.util.CollectionUtil;
import io.deephaven.engine.table.impl.DataAccessHelpers;
import io.deephaven.engine.table.impl.QueryTable;
import io.deephaven.engine.table.vectors.ColumnVectors;
import io.deephaven.plot.ChartImpl;
import io.deephaven.plot.datasets.category.CategoryDataSeries;
import io.deephaven.plot.datasets.data.*;
import io.deephaven.plot.datasets.interval.IntervalXYDataSeriesArray;
import io.deephaven.plot.errors.PlotInfo;
import io.deephaven.plot.util.tables.TableBackedPartitionedTableHandle;
import io.deephaven.plot.util.tables.TableHandle;
import io.deephaven.engine.table.DataColumn;
import io.deephaven.engine.table.Table;
import io.deephaven.engine.table.TableDefinition;
import io.deephaven.engine.context.QueryScope;
Expand All @@ -30,6 +29,7 @@
import io.deephaven.gui.color.ColorPalette;
import io.deephaven.gui.color.Paint;
import io.deephaven.gui.table.filters.Condition;
import io.deephaven.vector.Vector;
import org.jetbrains.annotations.NotNull;

import java.math.BigDecimal;
Expand Down Expand Up @@ -805,8 +805,8 @@ public HashMapWithDefault<K, V> copy() {
}

public static <T> IndexableData createIndexableData(final Table t, final String column, final PlotInfo plotInfo) {
final DataColumn<T> dataColumn = DataAccessHelpers.getColumn(t, column);
final Object o = dataColumn.getDirect();
final Vector<?> vector = ColumnVectors.of(t, column);
final Object o = vector.copyToArray();

return new IndexableDataArray((T[]) o, plotInfo);
}
Expand Down
Loading

0 comments on commit 732e907

Please sign in to comment.