Skip to content

Commit

Permalink
was able to acquire all union child writers
Browse files Browse the repository at this point in the history
  • Loading branch information
nbauernfeind committed Dec 3, 2024
1 parent efa5dee commit 00b66a7
Show file tree
Hide file tree
Showing 40 changed files with 522 additions and 318 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public BarrageSnapshotPerformanceLoggerImpl() {
ExecutionContext.getContext().getUpdateGraph(),
BarrageSnapshotPerformanceLoggerImpl.class.getName(),
Map.of(
BaseTable.BARRAGE_PERFORMANCE_KEY_ATTRIBUTE,
Table.BARRAGE_PERFORMANCE_KEY_ATTRIBUTE,
BarrageSnapshotPerformanceLogger.getDefaultTableName()));
blink = adapter.table();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public BarrageSubscriptionPerformanceLoggerImpl() {
ExecutionContext.getContext().getUpdateGraph(),
BarrageSubscriptionPerformanceLoggerImpl.class.getName(),
Map.of(
BaseTable.BARRAGE_PERFORMANCE_KEY_ATTRIBUTE,
Table.BARRAGE_PERFORMANCE_KEY_ATTRIBUTE,
BarrageSubscriptionPerformanceLogger.getDefaultTableName()));
blink = adapter.table();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
package io.deephaven.extensions.barrage;

import io.deephaven.chunk.ChunkType;
import org.apache.arrow.flatbuf.Field;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
* Describes type info used by factory implementations when creating a ChunkReader.
*/
public class BarrageTypeInfo {
public class BarrageTypeInfo<FIELD_TYPE> {
/**
* Factory method to create a TypeInfo instance.
*
Expand All @@ -20,22 +19,22 @@ public class BarrageTypeInfo {
* @param arrowField the Arrow type to be read into the chunk
* @return a TypeInfo instance
*/
public static BarrageTypeInfo make(
public static <FIELD_TYPE> BarrageTypeInfo<FIELD_TYPE> make(
@NotNull final Class<?> type,
@Nullable final Class<?> componentType,
@NotNull final Field arrowField) {
return new BarrageTypeInfo(type, componentType, arrowField);
@NotNull final FIELD_TYPE arrowField) {
return new BarrageTypeInfo<>(type, componentType, arrowField);
}

private final Class<?> type;
@Nullable
private final Class<?> componentType;
private final Field arrowField;
private final FIELD_TYPE arrowField;

public BarrageTypeInfo(
@NotNull final Class<?> type,
@Nullable final Class<?> componentType,
@NotNull final Field arrowField) {
@NotNull final FIELD_TYPE arrowField) {
this.type = type;
this.componentType = componentType;
this.arrowField = arrowField;
Expand All @@ -50,7 +49,7 @@ public Class<?> componentType() {
return componentType;
}

public Field arrowField() {
public FIELD_TYPE arrowField() {
return arrowField;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
import io.deephaven.chunk.WritableLongChunk;
import io.deephaven.chunk.WritableObjectChunk;
import io.deephaven.chunk.attributes.Values;
import io.deephaven.extensions.barrage.BarrageOptions;import io.deephaven.util.datastructures.LongSizedDataStructure;
import io.deephaven.extensions.barrage.BarrageOptions;
import io.deephaven.util.datastructures.LongSizedDataStructure;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
import io.deephaven.engine.rowset.RowSet;
import com.google.common.io.LittleEndianDataOutputStream;
import io.deephaven.UncheckedDeephavenException;
import io.deephaven.extensions.barrage.BarrageOptions;import io.deephaven.util.datastructures.LongSizedDataStructure;
import io.deephaven.extensions.barrage.BarrageOptions;
import io.deephaven.util.datastructures.LongSizedDataStructure;
import io.deephaven.chunk.ByteChunk;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import io.deephaven.extensions.barrage.BarrageOptions;
import io.deephaven.extensions.barrage.BarrageTypeInfo;
import io.deephaven.util.annotations.FinalDefault;
import org.apache.arrow.flatbuf.Field;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -35,7 +36,7 @@ interface Factory {
* @return a ChunkReader based on the given options, factory, and type to read
*/
<T extends WritableChunk<Values>> ChunkReader<T> newReader(
@NotNull BarrageTypeInfo typeInfo,
@NotNull BarrageTypeInfo<Field> typeInfo,
@NotNull BarrageOptions options);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import io.deephaven.util.datastructures.LongSizedDataStructure;
import io.deephaven.chunk.Chunk;
import io.deephaven.util.referencecounting.ReferenceCounted;
import org.apache.arrow.flatbuf.Field;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand All @@ -33,7 +34,7 @@ interface Factory {
* @return a ChunkWriter based on the given options, factory, and type to write
*/
<T extends Chunk<Values>> ChunkWriter<T> newWriter(
@NotNull BarrageTypeInfo typeInfo);
@NotNull BarrageTypeInfo<Field> typeInfo);
}

/**
Expand Down
Loading

0 comments on commit 00b66a7

Please sign in to comment.