Skip to content
Merged
Show file tree
Hide file tree
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 @@ -38,14 +38,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_ALP;
}

@Override
public boolean accepts(DType dtype) {
if (!(dtype instanceof DType.Primitive p)) {
return false;
}
return p.ptype() == PType.F64 || p.ptype() == PType.F32;
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer rawMeta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_ALPRD;
}

@Override
public boolean accepts(DType dtype) {
if (!(dtype instanceof DType.Primitive p)) {
return false;
}
return p.ptype() == PType.F32 || p.ptype() == PType.F64;
}

@Override
public Array decode(DecodeContext ctx) {
ALPRDMetadata meta = parseMeta(ctx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ public EncodingId encodingId() {
return EncodingId.FASTLANES_BITPACKED;
}

@Override
public boolean accepts(DType dtype) {
if (!(dtype instanceof DType.Primitive p)) {
return false;
}
return switch (p.ptype()) {
case I8, I16, I32, I64, U8, U16, U32, U64 -> true;
default -> false;
};
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer rawMeta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.dfa1.vortex.reader.decode;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.encoding.EncodingId;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.reader.array.MaterializedBoolArray;
Expand All @@ -19,11 +18,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_BOOL;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Bool;
}

@Override
public Array decode(DecodeContext ctx) {
return new MaterializedBoolArray(ctx.dtype(), ctx.rowCount(), ctx.buffer(0));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.dfa1.vortex.reader.decode;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.encoding.EncodingId;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.reader.array.MaterializedBoolArray;
Expand All @@ -21,11 +20,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_BYTEBOOL;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Bool;
}

@Override
public Array decode(DecodeContext ctx) {
long n = ctx.rowCount();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_CHUNKED;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Primitive
|| dtype instanceof DType.Bool
|| dtype instanceof DType.Struct;
}

@Override
public Array decode(DecodeContext ctx) {
int nchildren = ctx.node().children().length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_CONSTANT;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Primitive;
}

@Override
public Array decode(DecodeContext ctx) {
MemorySegment scalarBuf = ctx.buffer(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_DATETIMEPARTS;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Extension;
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer meta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_DECIMAL_BYTE_PARTS;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Decimal;
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer meta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.dfa1.vortex.reader.decode;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.VortexException;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.reader.array.LazyDecimalArray;
Expand All @@ -23,11 +22,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_DECIMAL;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Decimal;
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer meta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ public EncodingId encodingId() {
return EncodingId.FASTLANES_DELTA;
}

@Override
public boolean accepts(DType dtype) {
if (!(dtype instanceof DType.Primitive p)) {
return false;
}
return switch (p.ptype()) {
case I8, I16, I32, I64, U8, U16, U32, U64 -> true;
default -> false;
};
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer rawMeta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_DICT;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Primitive || dtype instanceof DType.Utf8;
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer meta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.dfa1.vortex.reader.decode;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.encoding.EncodingId;

Expand All @@ -16,12 +15,6 @@ public interface EncodingDecoder {
/// @return the wire identifier
EncodingId encodingId();

/// Returns whether this decoder handles the given dtype.
///
/// @param dtype the dtype to test
/// @return `true` if this decoder can handle arrays of `dtype`
boolean accepts(DType dtype);

/// Decodes an array node from the file using the provided context.
///
/// @param ctx decoding context containing buffers, dtype, row count, and child registry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_EXT;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Extension;
}

@Override
public Array decode(DecodeContext ctx) {
if (!(ctx.dtype() instanceof DType.Extension ext)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_FIXED_SIZE_LIST;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.FixedSizeList;
}

@Override
public Array decode(DecodeContext ctx) {
if (!(ctx.dtype() instanceof DType.FixedSizeList fsl)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ public EncodingId encodingId() {
return EncodingId.FASTLANES_FOR;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Primitive p && !p.ptype().isFloating();
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer rawMeta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_FSST;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Utf8 || dtype instanceof DType.Binary;
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer rawMeta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_LIST;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.List;
}

@Override
public Array decode(DecodeContext ctx) {
if (!(ctx.dtype() instanceof DType.List listDtype)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_LISTVIEW;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.List;
}

@Override
public Array decode(DecodeContext ctx) {
if (!(ctx.dtype() instanceof DType.List listDtype)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_MASKED;
}

@Override
public boolean accepts(DType dtype) {
return false;
}

@Override
public Array decode(DecodeContext ctx) {
if (ctx.node().bufferIndices().length != 0) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.dfa1.vortex.reader.decode;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.reader.array.NullArray;
import io.github.dfa1.vortex.encoding.EncodingId;
Expand All @@ -17,11 +16,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_NULL;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Null;
}

@Override
public Array decode(DecodeContext ctx) {
return new NullArray(ctx.dtype(), ctx.rowCount());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_PATCHED;
}

@Override
public boolean accepts(DType dtype) {
return false;
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer rawMeta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_PCO;
}

@Override
public boolean accepts(DType dtype) {
return false;
}

@Override
public Array decode(DecodeContext ctx) {
PcoMetadata meta = parseMeta(ctx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_PRIMITIVE;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Primitive;
}

@Override
public Array decode(DecodeContext ctx) {
MemorySegment buf = ctx.buffer(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ public EncodingId encodingId() {
return EncodingId.FASTLANES_RLE;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Primitive p && !p.ptype().isFloating();
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer rawMeta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_RUNEND;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Primitive p && !p.ptype().isFloating();
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer rawMeta = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_SEQUENCE;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Primitive;
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer metaBuf = ctx.metadata();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ public EncodingId encodingId() {
return EncodingId.VORTEX_SPARSE;
}

@Override
public boolean accepts(DType dtype) {
return dtype instanceof DType.Primitive;
}

@Override
public Array decode(DecodeContext ctx) {
ByteBuffer rawMeta = ctx.metadata();
Expand Down
Loading
Loading