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
6 changes: 3 additions & 3 deletions cli/src/main/java/io/github/dfa1/vortex/cli/tui/IoWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/// opened the file. The TUI dispatches all such calls to this worker so the
/// render loop on the main thread never crosses the arena's owning thread.
///
/// {@link #pending()} drives the status-line counter; callers should check it
/// [#pending()] drives the status-line counter; callers should check it
/// when computing UI state.
public final class IoWorker implements AutoCloseable {

Expand Down Expand Up @@ -40,8 +40,8 @@ public void submit(Runnable task) {
return;
}
pending.incrementAndGet();
// Unbounded {@link LinkedBlockingQueue} never rejects on capacity; {@code add} is the
// right idiom (throws {@code IllegalStateException} on the impossible case) so we don't
// Unbounded [LinkedBlockingQueue] never rejects on capacity; `add` is the
// right idiom (throws `IllegalStateException` on the impossible case) so we don't
// silently drop tasks if anyone ever swaps in a bounded queue.
queue.add(() -> {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FilterCommandTest {

@BeforeEach
void setUp() throws IOException {
// 3-row Vortex file with one I64 column {@code id} = [1, 2, 3].
// 3-row Vortex file with one I64 column `id` = [1, 2, 3].
file = writeSmallVortex(tmp, "filter.vortex");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void noArgs_returnsUsageError() {

@Test
void delimiterMissingValue_returnsUsageError() {
// Given / When — {@code --delimiter} at the tail with no value
// Given / When — `--delimiter` at the tail with no value
CliTestSupport.Captured result = capture(() ->
ImportCommand.run(new String[]{"import", "--delimiter"}));

Expand Down Expand Up @@ -125,9 +125,9 @@ void csvWithCustomDelimiter_imports(@TempDir Path tmp) throws IOException {
ImportCommand.run(new String[]{"import", "--delimiter", "\t", csv.toString()}));

// Then — without the explicit delimiter the import would treat the whole row as one
// column. Success here confirms the {@code --delimiter} flag plumbs through.
// Output filename: input is {@code data.tsv}, deriveOutputPath only strips
// {@code .csv}/{@code .parquet} suffixes, so the result is {@code data.tsv.vortex}.
// column. Success here confirms the `--delimiter` flag plumbs through.
// Output filename: input is `data.tsv`, deriveOutputPath only strips
// `.csv`/`.parquet` suffixes, so the result is `data.tsv.vortex`.
assertThat(result.status()).isEqualTo(ExitStatus.OK);
assertThat(tmp.resolve("data.tsv.vortex")).exists();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ void next_multiDigitTildeCode_handlesTwoDigits() throws IOException {

@Test
void next_ss3SequenceVariant_decodesArrows() throws IOException {
// Given — DEC keypad / VT100 application-cursor mode uses {@code ESC O A}
// instead of {@code ESC [ A}. KeyDecoder must accept both prefixes so the
// Given — DEC keypad / VT100 application-cursor mode uses `ESC O A`
// instead of `ESC [ A`. KeyDecoder must accept both prefixes so the
// TUI works under tmux / screen / putty configurations that ship SS3.
assertThat(KeyDecoder.next(bytes(0x1B, 'O', 'A'))).isEqualTo(Key.ArrowUp.INSTANCE);
assertThat(KeyDecoder.next(bytes(0x1B, 'O', 'D'))).isEqualTo(Key.ArrowLeft.INSTANCE);
Expand All @@ -135,7 +135,7 @@ void next_ss3SequenceVariant_decodesArrows() throws IOException {

@Test
void next_unknownEscapePrefix_yieldsEscape() throws IOException {
// Given — {@code ESC X} (X is neither '[' nor 'O') is not a recognised
// Given — `ESC X` (X is neither '[' nor 'O') is not a recognised
// CSI or SS3 sequence. Must return Escape rather than try to decode further.
ByteArrayInputStream in = bytes(0x1B, 'X', 'A');

Expand All @@ -148,7 +148,7 @@ void next_unknownEscapePrefix_yieldsEscape() throws IOException {

@Test
void next_eofMidTildeSequence_returnsEof() throws IOException {
// Given — partial {@code ESC [ 5} with no trailing tilde / digit
// Given — partial `ESC [ 5` with no trailing tilde / digit
ByteArrayInputStream in = bytes(0x1B, '[', '5');

// When
Expand All @@ -160,7 +160,7 @@ void next_eofMidTildeSequence_returnsEof() throws IOException {

@Test
void next_tildeWithoutTrailingTildeChar_yieldsEscape() throws IOException {
// Given — {@code ESC [ 5 x}: digit followed by a non-tilde non-digit.
// Given — `ESC [ 5 x`: digit followed by a non-tilde non-digit.
// The trailing character must be re-yielded by the next call, not lost.
ByteArrayInputStream in = bytes(0x1B, '[', '5', 'x', 'y');

Expand All @@ -177,7 +177,7 @@ void next_tildeWithoutTrailingTildeChar_yieldsEscape() throws IOException {
@Test
void next_controlByte_returnsCharWithRawValue() throws IOException {
// Given — Ctrl-C is 0x03, no special handling — surfaced as Char so the
// TUI's keymap can match it via {@code Key.Char(3)} if needed.
// TUI's keymap can match it via `Key.Char(3)` if needed.
ByteArrayInputStream in = bytes(0x03);

// When
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/io/github/dfa1/vortex/core/PType.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ public boolean isSigned() {
///
/// Unlike `PType.values()[ordinal]`, this method validates the ordinal against the
/// declared range and throws [VortexException] for crafted out-of-range values rather
/// than the JDK's {@link ArrayIndexOutOfBoundsException}. Use this at every decode site that
/// than the JDK's [ArrayIndexOutOfBoundsException]. Use this at every decode site that
/// reads a ptype from untrusted metadata.
///
/// @param ordinal the enum ordinal, typically taken from a Protobuf `ptype` field
/// @return the {@link PType} for the given ordinal
/// @return the [PType] for the given ordinal
/// @throws VortexException if `ordinal` is negative or greater than the largest defined
/// {@link PType} ordinal
/// [PType] ordinal
public static PType fromOrdinal(int ordinal) {
PType[] all = values();
if (ordinal < 0 || ordinal >= all.length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public enum TimeUnit {
Milliseconds,
/// Seconds — ordinal 3.
Seconds,
/// Days — ordinal 4. Not sub-dividable; {@link #divisor()} throws for this value.
/// Days — ordinal 4. Not sub-dividable; [#divisor()] throws for this value.
Days;

/// Returns the `TimeUnit` for the given wire tag byte.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void writeEmbedded(byte[] encoded) {
/// Returns a mark to pass back to [#endLenDelim(int)]; the caller writes the payload
/// in between. Avoids the alloc/copy round-trip of writing into a temporary `ProtoWriter`.
///
/// Reserves the worst-case 5 bytes for a varint32 length; {@link #endLenDelim} backpatches
/// Reserves the worst-case 5 bytes for a varint32 length; [#endLenDelim] backpatches
/// the actual length and shifts the payload left if a shorter varint suffices.
int beginLenDelim() {
ensure(MAX_LEN_VARINT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
///
/// The schema is derived from [ResultSetMetaData] — no type inference is needed.
/// SQL NULL values are mapped to `0`, `0.0`, `false`, or `""` depending on column type.
/// Use {@link JdbcImportOptions#withFetchSize} to control driver-side streaming for large tables.
/// Use [JdbcImportOptions#withFetchSize] to control driver-side streaming for large tables.
public final class JdbcImporter {

private JdbcImporter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
///
/// Two Parquet variants:
/// - `parquetRead` / `parquetReadMultiColumn`: batch column API
/// ({@link ColumnReader#nextBatch()} + {@link ColumnReader#getDoubles()}) —
/// ([ColumnReader#nextBatch()] + [ColumnReader#getDoubles()]) —
/// apples-to-apples comparison with Vortex's batch fold.
/// - `parquetReadRowByRow` / `parquetReadMultiColumnRowByRow`:
/// Hardwood row cursor ({@link RowReader}) — measures row-oriented API overhead
/// Hardwood row cursor ([RowReader]) — measures row-oriented API overhead
/// on top of format decode cost.
///
/// Override the Parquet source with: `-Dbench.parquet=/path/to/file.parquet`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
/// with a `close > threshold` predicate at varying selectivity.
///
/// Phase 0 instrument for ADR 0010 (lazy decode). The threshold is chosen at
/// setup time so each {@link #selectivity} value selects approximately that
/// setup time so each [#selectivity] value selects approximately that
/// fraction of rows. Both readers report the sum of surviving close values so
/// the JVM cannot elide the per-row work.
///
Expand All @@ -52,7 +52,7 @@
///
/// Requires a pre-existing OHLC file:
/// `-Dvortex.bench.ohlc=/path/to/file.vtx`. Generate one by running
/// {@link RustVsJavaReadBenchmark} first with the same `vortex.bench.ohlc`
/// [RustVsJavaReadBenchmark] first with the same `vortex.bench.ohlc`
/// pointing at the path you want (the read benchmark will write it lazily if
/// the file does not exist yet).
@State(Scope.Benchmark)
Expand All @@ -74,7 +74,7 @@ public class RustVsJavaFilterBenchmark {
}

/// Target fraction of rows that should satisfy `close > threshold`.
/// The threshold is computed in {@link #setup()} from a sample of the
/// The threshold is computed in [#setup()] from a sample of the
/// "close" column; the realised selectivity is reported in the setup log
/// and may differ slightly from this value on small samples.
@Param({"0.001", "0.01", "0.1", "1.0"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
import java.util.Random;
import java.util.concurrent.TimeUnit;

/// Big-file scan benchmark for files exceeding 2 GB ({@link io.github.dfa1.vortex.reader.SegmentSpec#length()}
/// Big-file scan benchmark for files exceeding 2 GB ([io.github.dfa1.vortex.reader.SegmentSpec#length()]
/// is `long`, so segments up to 4 GB are supported).
///
/// Setup: JNI writer produces a >2 GB Vortex file with 4 incompressible I64 columns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/// Read-side registry: maps [EncodingId] to [EncodingDecoder] implementations.
///
/// Instances are immutable after construction. Build one via [#builder()] or
/// via the {@link #loadAll()} and {@link #empty()} convenience factories.
/// via the [#loadAll()] and [#empty()] convenience factories.
public final class ReadRegistry {

private final Map<EncodingId, EncodingDecoder> decoders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/// Internal materialization engine: turns any [Array] into its primary
/// [MemorySegment], allocating from a caller-supplied arena for lazy variants.
///
/// If `arr` is a {@link MaskedArray}, the inner (data) segment is returned;
/// If `arr` is a [MaskedArray], the inner (data) segment is returned;
/// the validity mask is not surfaced here — callers that need validity must unwrap manually.
///
/// **Vortex-internal — not public API.** This class is `public` only because the reader,
Expand All @@ -20,8 +20,8 @@
/// (which routes here). It backs that seam plus
/// [io.github.dfa1.vortex.reader.ReadRegistry#decodeAsSegment] and the scan layer's dictionary
/// validation. Application code should prefer the typed accessors on concrete subtypes —
/// {@link LongArray#getLong(long)}, {@link IntArray#getInt(long)},
/// {@link DoubleArray#getDouble(long)}, and friends.
/// [LongArray#getLong(long)], [IntArray#getInt(long)],
/// [DoubleArray#getDouble(long)], and friends.
public final class ArraySegments {

private ArraySegments() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public record ChunkedBoolArray(DType dtype, long length, BoolArray[] children, l
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new [ChunkedBoolArray]
/// @throws VortexException on empty input, non-{@link BoolArray} chunks, or row-count mismatch
/// @throws VortexException on empty input, non-[BoolArray] chunks, or row-count mismatch
public static ChunkedBoolArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
throw new VortexException("ChunkedBoolArray: empty chunk list");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public record ChunkedByteArray(DType dtype, long length, ByteArray[] children, l
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new [ChunkedByteArray]
/// @throws VortexException on empty input, non-{@link ByteArray} chunks, or row-count mismatch
/// @throws VortexException on empty input, non-[ByteArray] chunks, or row-count mismatch
public static ChunkedByteArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
throw new VortexException("ChunkedByteArray: empty chunk list");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public record ChunkedDoubleArray(DType dtype, long length, DoubleArray[] childre
/// @param dtype logical element type
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new {@link ChunkedDoubleArray}
/// @throws VortexException on empty input, non-{@link DoubleArray} chunks, or row-count mismatch
/// @return a new [ChunkedDoubleArray]
/// @throws VortexException on empty input, non-[DoubleArray] chunks, or row-count mismatch
public static ChunkedDoubleArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
throw new VortexException("ChunkedDoubleArray: empty chunk list");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public record ChunkedFloatArray(DType dtype, long length, FloatArray[] children,
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new [ChunkedFloatArray]
/// @throws VortexException on empty input, non-{@link FloatArray} chunks, or row-count mismatch
/// @throws VortexException on empty input, non-[FloatArray] chunks, or row-count mismatch
public static ChunkedFloatArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
throw new VortexException("ChunkedFloatArray: empty chunk list");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public record ChunkedIntArray(DType dtype, long length, IntArray[] children, lon
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new [ChunkedIntArray]
/// @throws VortexException on empty input, non-{@link IntArray} chunks, or row-count mismatch
/// @throws VortexException on empty input, non-[IntArray] chunks, or row-count mismatch
public static ChunkedIntArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
throw new VortexException("ChunkedIntArray: empty chunk list");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public record ChunkedLongArray(DType dtype, long length, LongArray[] children, l
/// @param dtype logical element type
/// @param totalRows expected total row count across all chunks
/// @param chunks non-empty list of chunk arrays
/// @return a new {@link ChunkedLongArray} over the flattened chunks
/// @throws VortexException on empty input, non-{@link LongArray} chunks, or row-count mismatch
/// @return a new [ChunkedLongArray] over the flattened chunks
/// @throws VortexException on empty input, non-[LongArray] chunks, or row-count mismatch
public static ChunkedLongArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
throw new VortexException("ChunkedLongArray: empty chunk list");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public record ChunkedShortArray(DType dtype, long length, ShortArray[] children,
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new [ChunkedShortArray]
/// @throws VortexException on empty input, non-{@link ShortArray} chunks, or row-count mismatch
/// @throws VortexException on empty input, non-[ShortArray] chunks, or row-count mismatch
public static ChunkedShortArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
throw new VortexException("ChunkedShortArray: empty chunk list");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private DecimalBytePartsArrays() {
///
/// @param arr source typed Array (must be one of Byte/Short/Int/Long, optionally MaskedArray-wrapped)
/// @param i row index
/// @return cell value as a {@link BigInteger}
/// @return cell value as a [BigInteger]
/// @throws VortexException for null cells or unsupported array types
static BigInteger readMantissa(Array arr, long i) {
return switch (arr) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
///
/// The `codes` array is typed as [Array] because the codes ptype
/// varies with dictionary size — U8/U16/U32/U64 backed by
/// {@link ByteArray}/{@link ShortArray}/{@link IntArray}/{@link LongArray}.
/// [ByteArray]/[ShortArray]/[IntArray]/[LongArray].
///
/// @param dtype logical element type (matches `values.dtype()`)
/// @param length total logical row count (matches `codes.length()`)
/// @param values dictionary pool — element at code `c` is `values.getDouble(c)`
/// @param codes per-row index into `values`; must be one of
/// {@link ByteArray}, {@link ShortArray}, {@link IntArray}, {@link LongArray}
/// [ByteArray], [ShortArray], [IntArray], [LongArray]
public record DictDoubleArray(DType dtype, long length, DoubleArray values, Array codes) implements DoubleArray {

/// Builds a [DictDoubleArray], validating that `codes` is one of the
Expand All @@ -31,8 +31,8 @@ public record DictDoubleArray(DType dtype, long length, DoubleArray values, Arra
/// @param length total logical row count
/// @param values dictionary pool
/// @param codes per-row code array (must be [ByteArray], [ShortArray],
/// {@link IntArray}, or {@link LongArray})
/// @return a new {@link DictDoubleArray}
/// [IntArray], or [LongArray])
/// @return a new [DictDoubleArray]
/// @throws VortexException if `codes` is not a supported code-array type or
/// its length does not equal `length`
public static DictDoubleArray of(DType dtype, long length, DoubleArray values, Array codes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
///
/// The `codes` array is typed as [Array] because the codes ptype
/// varies with dictionary size — U8/U16/U32/U64 backed by
/// {@link ByteArray}/{@link ShortArray}/{@link IntArray}/{@link LongArray}.
/// [ByteArray]/[ShortArray]/[IntArray]/[LongArray].
///
/// @param dtype logical element type (matches `values.dtype()`)
/// @param length total logical row count (matches `codes.length()`)
/// @param values dictionary pool — element at code `c` is `values.getFloat(c)`
/// @param codes per-row index into `values`; must be one of
/// {@link ByteArray}, {@link ShortArray}, {@link IntArray}, {@link LongArray}
/// [ByteArray], [ShortArray], [IntArray], [LongArray]
public record DictFloatArray(DType dtype, long length, FloatArray values, Array codes) implements FloatArray {

/// Builds a [DictFloatArray], validating that `codes` is one of the
Expand All @@ -30,8 +30,8 @@ public record DictFloatArray(DType dtype, long length, FloatArray values, Array
/// @param length total logical row count
/// @param values dictionary pool
/// @param codes per-row code array (must be [ByteArray], [ShortArray],
/// {@link IntArray}, or {@link LongArray})
/// @return a new {@link DictFloatArray}
/// [IntArray], or [LongArray])
/// @return a new [DictFloatArray]
/// @throws VortexException if `codes` is not a supported code-array type or
/// its length does not equal `length`
public static DictFloatArray of(DType dtype, long length, FloatArray values, Array codes) {
Expand Down
Loading