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 @@ -16,7 +16,7 @@
/// Shared handle plumbing for the interactive subcommands (`view`, `tui`).
///
/// A [VortexReader] uses a confined [java.lang.foreign.Arena], so the file must be
/// opened and closed on the same {@link IoWorker} thread the TUI later dispatches I/O to. These
/// opened and closed on the same [IoWorker] thread the TUI later dispatches I/O to. These
/// helpers centralise that worker round-trip plus the local-file / http(s) target resolution.
@SuppressWarnings("java:S106") // CLI tool: user-facing diagnostics go to System.err by design.
final class CliHandles {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/// Single-threaded I/O executor that owns one [io.github.dfa1.vortex.reader.VortexHandle].
///
/// Vortex readers use a confined {@link java.lang.foreign.Arena}, so every
/// Vortex readers use a confined [java.lang.foreign.Arena], so every
/// `slice()` / `scan()` call must happen on the same thread that
/// 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static void show(VortexHandle handle, InspectorTree.Progress progress) th

/// Variant that dispatches every `handle` I/O call onto the supplied
/// [IoWorker]. Required when the handle was opened on a different
/// thread (Vortex readers use a confined {@link java.lang.foreign.Arena},
/// thread (Vortex readers use a confined [java.lang.foreign.Arena],
/// so cross-thread access throws `WrongThreadException`).
///
/// Passing `null` for `worker` falls back to synchronous I/O
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/// into the alternate screen / raw mode. Class load alone is the safe, meaningful
/// assertion: it forces every `Linker.downcallHandle` in the static initializer
/// (tcgetattr, tcsetattr, cfmakeraw, ioctl) to resolve its libc symbol, throwing
/// {@link UnsatisfiedLinkError} during `<clinit>` if an entry point is missing.
/// [UnsatisfiedLinkError] during `<clinit>` if an entry point is missing.
class PosixTerminalSmokeTest {

@Test
Expand Down
8 changes: 4 additions & 4 deletions core/src/main/java/io/github/dfa1/vortex/core/DType.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public sealed interface DType
/// [#withNullable(boolean)] so call sites read as a fluent adjective:
/// `DType.i64().asNullable()`.
///
/// @return a new {@link DType} identical to this one but with `nullable = true`
/// @return a new [DType] identical to this one but with `nullable = true`
default DType asNullable() {
return withNullable(true);
}
Expand Down Expand Up @@ -158,13 +158,13 @@ static Decimal decimal(int precision, int scale) {
/// .build();
/// ```
///
/// @return a new {@link StructBuilder}
/// @return a new [StructBuilder]
static StructBuilder structBuilder() {
return new StructBuilder();
}

/// Fluent builder for [Struct] dtypes. Use [#structBuilder()] to obtain one.
/// Preserves insertion order and rejects duplicate field names at {@link #build()}.
/// Preserves insertion order and rejects duplicate field names at [#build()].
final class StructBuilder {
private final LinkedHashMap<String, DType> fields = new LinkedHashMap<>();
private boolean nullable;
Expand Down Expand Up @@ -195,7 +195,7 @@ public StructBuilder asNullable() {

/// Builds the [Struct] dtype.
///
/// @return a new {@link Struct} reflecting every field added so far
/// @return a new [Struct] reflecting every field added so far
public Struct build() {
return new Struct(
java.util.List.copyOf(fields.keySet()),
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/github/dfa1/vortex/core/PType.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public boolean isSigned() {
/// uses to identify a physical type.
///
/// Unlike `PType.values()[ordinal]`, this method validates the ordinal against the
/// declared range and throws {@link VortexException} for crafted out-of-range values rather
/// 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
/// reads a ptype from untrusted metadata.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.nio.charset.StandardCharsets;

/// Stateful cursor over a [MemorySegment] that decodes proto3 wire-format primitives.
/// Generated record types call into this from their {@code decode(...)} static factories.
/// Generated record types call into this from their `decode(...)` static factories.
/// Package-private — generated code lives in the same package.
final class ProtoReader {

Expand Down Expand Up @@ -108,7 +108,7 @@ String readString() throws IOException {
}

/// Reads a length-delimited byte sequence into a fresh `byte[]`.
/// Use {@link #readLenDelimSegment()} for zero-copy access when the consumer can hold a segment slice.
/// Use [#readLenDelimSegment()] for zero-copy access when the consumer can hold a segment slice.
byte[] readBytes() throws IOException {
int len = readVarint32();
ensureBytes(len);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void writeEmbedded(byte[] encoded) {

/// Reserves space for a length-delimited region whose payload size is unknown until written.
/// 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 {@code ProtoWriter}.
/// 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
/// the actual length and shifts the payload left if a shorter varint suffices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void id_isNonBlankString(EncodingId id) {
@EnumSource(EncodingId.class)
void toString_equalsId(EncodingId id) {
// Given / When / Then
assertThat(id.toString()).isEqualTo(id.id());
assertThat(id).hasToString(id.id());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void recordsWithEqualByteArraysAreEqual() {

// When + Then
assertThat(a).isEqualTo(b);
assertThat(a.hashCode()).isEqualTo(b.hashCode());
assertThat(a).hasSameHashCodeAs(b);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static InspectorTree build(VortexHandle handle) {
/// resulting tree contains only structure derived from the file's footer
/// and layout, so the call is essentially free on remote handles.
///
/// Use with {@link #peek(Node, VortexHandle)} for lazy on-demand resolution.
/// Use with [#peek(Node, VortexHandle)] for lazy on-demand resolution.
///
/// @param handle open file handle
/// @return immutable shallow inspector tree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/// vortex-layout/src/layouts/zoned/mod.rs</a> — `ZonedMetadata`):
/// bytes [0..4) are the zone length as a little-endian `u32`;
/// remaining bytes form a `Stat` bitset (LSB-first per byte). Each
/// set bit at index `i` indicates that the {@link Stat} with that
/// set bit at index `i` indicates that the [Stat] with that
/// ordinal is present in the auxiliary stats table.
/// - Schema construction
/// (<a href="https://github.com/spiraldb/vortex/blob/develop/vortex-layout/src/layouts/zoned/schema.rs">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,9 @@ void rust_vs_javaReader_statsMatch(String fixture, @TempDir Path tmp) throws Exc
.as("string column names in %s", fixture)
.containsAll(resultRust.strLenSums().keySet());
for (Map.Entry<String, Long> entry : resultRust.strLenSums().entrySet()) {
assertThat(resultJava.strLenSums().get(entry.getKey()))
assertThat(resultJava.strLenSums())
.describedAs("string column '%s' byte-length sum in %s", entry.getKey(), fixture)
.isEqualTo(entry.getValue());
.containsEntry(entry.getKey(), entry.getValue());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ void jniWriter_javaReader_f16_primitiveRoundTrip(@TempDir Path tmp) throws IOExc
assertThat(results).hasSize(1);
// F16 column snapshots as a short[] (raw float16 bits)
short[] decoded = (short[]) results.getFirst().columns().get("v");
assertThat(decoded.length).isEqualTo(f16bits.length);
assertThat(decoded).hasSameSizeAs(f16bits);
for (int i = 0; i < f16bits.length; i++) {
assertThat(Float.float16ToFloat(decoded[i]))
.as("index %d", i)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/// Reads rows from a JDBC [ResultSet] and writes a Vortex file.
///
/// The schema is derived from {@link ResultSetMetaData} — no type inference is needed.
/// 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.
public final class JdbcImporter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ private static String writeStmtOnWriter(Ast.Scalar s, String writer, String valu
// ------------------------------------------------------------------

/// Emits a try/catch wrapper that translates [IllegalArgumentException] from
/// `Enum.fromValue(int)` into a checked {@link IOException}. The caller must already be
/// `Enum.fromValue(int)` into a checked [IOException]. The caller must already be
/// inside a `throws IOException` context (every `decode(...)` factory is).
private static void emitEnumDecodeWrap(StringBuilder sb, String indent, String javaName, String assignTarget) {
sb.append(indent).append("int __ev = r.readVarint32();\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/// A token emitted by [Lexer].
///
/// @param kind token kind
/// @param text source text — meaningful for {@link Kind#IDENT}, {@link Kind#INT_LITERAL}, {@link Kind#STRING_LITERAL}
/// @param text source text — meaningful for [Kind#IDENT], [Kind#INT_LITERAL], [Kind#STRING_LITERAL]
/// @param line 1-based source line number for diagnostics
public record Token(Kind kind, String text, int line) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public <T extends Array> T column(String name) {
///
/// @param name column name as declared in the file's schema
/// @param domainType the spec extension's Java domain type (e.g. [LocalDate] for
/// `vortex.date`, {@link Instant} for `vortex.timestamp`)
/// `vortex.date`, [Instant] for `vortex.timestamp`)
/// @param <T> domain element type
/// @return decoded values in row order
/// @throws VortexException if `name` isn't present, isn't an extension column,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// Read-side contract for a Vortex extension type.
///
/// Implementations pair a spec identity ([ExtensionId]) with the matching
/// {@link DType.Extension} dtype. Typed decode methods live on each concrete
/// [DType.Extension] dtype. Typed decode methods live on each concrete
/// implementation — they are not on this interface, so read callers get typed return
/// values without casting through `Object`.
public interface ExtensionDecoder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// Flat segment wire format:
/// `buffer_data... | FlatBuffer(Array) | u32 LE = FlatBuffer byte length`
///
/// {@link ReadRegistry} is pure dispatch; this class owns all file-format knowledge:
/// [ReadRegistry] is pure dispatch; this class owns all file-format knowledge:
/// FlatBuffer parsing, buffer-offset arithmetic, and encoding-spec lookup.
public final class FlatSegmentDecoder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/// Read-side registry: maps [EncodingId] to [EncodingDecoder] implementations.
///
/// Instances are immutable after construction. Build one via {@link #builder()} or
/// Instances are immutable after construction. Build one via [#builder()] or
/// via the {@link #loadAll()} and {@link #empty()} convenience factories.
public final class ReadRegistry {

Expand All @@ -32,7 +32,7 @@ private ReadRegistry(Map<EncodingId, EncodingDecoder> decoders, boolean allowUnk

/// Loads all service-discovered [EncodingDecoder] implementations.
///
/// @return an immutable {@link ReadRegistry} populated with all service-loaded decoders
/// @return an immutable [ReadRegistry] populated with all service-loaded decoders
public static ReadRegistry loadAll() {
return builder().registerServiceLoaded().build();
}
Expand Down Expand Up @@ -134,7 +134,7 @@ private static UnknownArray decodeUnknown(DecodeContext ctx, ArrayNode node) {

/// Builder for [ReadRegistry].
///
/// Not thread-safe. Build once, use everywhere — the produced {@link ReadRegistry} is immutable.
/// Not thread-safe. Build once, use everywhere — the produced [ReadRegistry] is immutable.
public static final class Builder {

private final Map<EncodingId, EncodingDecoder> decoders = new HashMap<>();
Expand Down Expand Up @@ -170,7 +170,7 @@ public Builder registerServiceLoaded() {
/// Enable passthrough decode for unknown encoding ids.
///
/// Default is strict: unknown ids throw [VortexException]. When enabled, unknown
/// nodes are wrapped as {@link io.github.dfa1.vortex.reader.array.UnknownArray}.
/// nodes are wrapped as [io.github.dfa1.vortex.reader.array.UnknownArray].
/// Mirrors Rust `VortexSession::allow_unknown()`.
///
/// @return this builder, for chaining
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public interface VortexHandle extends Closeable {
///
/// **Internal escape hatch.** Exposed for tooling
/// (e.g. the inspector's dictionary preview) that needs to decode an
/// internal subtree node directly via {@link io.github.dfa1.vortex.reader.FlatSegmentDecoder}.
/// internal subtree node directly via [io.github.dfa1.vortex.reader.FlatSegmentDecoder].
/// Not part of the supported stability contract; signatures may change
/// without deprecation.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public io.github.dfa1.vortex.reader.array.Array decodeFlatSegment(
/// Returns an off-heap [MemorySegment] tied to this reader's [Arena].
///
/// @param spec the segment to fetch
/// @return a read-only {@link MemorySegment} containing the fetched bytes
/// @return a read-only [MemorySegment] containing the fetched bytes
@Override
public MemorySegment rawSegment(SegmentSpec spec) {
long offset = spec.offset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Optional;

/// Internal materialization engine: turns any [Array] into its primary
/// {@link MemorySegment}, allocating from a caller-supplied arena for lazy variants.
/// [MemorySegment], allocating from a caller-supplied arena for lazy variants.
///
/// If `arr` is a {@link MaskedArray}, the inner (data) segment is returned;
/// the validity mask is not surfaced here — callers that need validity must unwrap manually.
Expand Down Expand Up @@ -69,7 +69,7 @@ private static MemorySegment primarySegment(Array arr) {
///
/// @param arr the array whose segment is needed
/// @param arena allocator used to materialise lazy variants
/// @return the primary {@link MemorySegment}
/// @return the primary [MemorySegment]
/// @throws VortexException if the array type has no primary segment
public static MemorySegment of(Array arr, SegmentAllocator arena) {
Array data = arr instanceof MaskedArray m ? m.inner() : arr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public record ChunkedBoolArray(DType dtype, long length, BoolArray[] children, l
/// @param dtype logical element type
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new {@link ChunkedBoolArray}
/// @return a new [ChunkedBoolArray]
/// @throws VortexException on empty input, non-{@link BoolArray} chunks, or row-count mismatch
public static ChunkedBoolArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public record ChunkedByteArray(DType dtype, long length, ByteArray[] children, l
/// @param dtype logical element type
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new {@link ChunkedByteArray}
/// @return a new [ChunkedByteArray]
/// @throws VortexException on empty input, non-{@link ByteArray} chunks, or row-count mismatch
public static ChunkedByteArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.function.DoubleConsumer;

/// Multi-chunk [DoubleArray] view; record per ADR 0012 with stateless
/// {@link ChunkedLongArray#findChunk(long[], long)} dispatch.
/// [ChunkedLongArray#findChunk(long[], long)] dispatch.
///
/// @param dtype logical element type
/// @param length total logical row count
Expand All @@ -20,7 +20,7 @@
public record ChunkedDoubleArray(DType dtype, long length, DoubleArray[] children, long[] offsets) implements DoubleArray {

/// Builds a [ChunkedDoubleArray]. Flattens nested chunked arrays;
/// unwraps {@link MaskedArray} chunks.
/// unwraps [MaskedArray] chunks.
///
/// @param dtype logical element type
/// @param totalRows expected total row count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public record ChunkedFloatArray(DType dtype, long length, FloatArray[] children,
/// @param dtype logical element type
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new {@link ChunkedFloatArray}
/// @return a new [ChunkedFloatArray]
/// @throws VortexException on empty input, non-{@link FloatArray} chunks, or row-count mismatch
public static ChunkedFloatArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public record ChunkedIntArray(DType dtype, long length, IntArray[] children, lon
/// @param dtype logical element type
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new {@link ChunkedIntArray}
/// @return a new [ChunkedIntArray]
/// @throws VortexException on empty input, non-{@link IntArray} chunks, or row-count mismatch
public static ChunkedIntArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/// Multi-chunk [LongArray] view backed by an immutable array of child
/// chunks plus their cumulative row offsets. Scalar access is stateless —
/// {@link #getLong(long)} resolves the chunk index via {@link #findChunk(long[], long)}
/// [#getLong(long)] resolves the chunk index via [#findChunk(long[], long)]
/// (a binary search over `offsets`) on every call.
///
/// Per ADR 0012, this preserves zero-copy on multi-chunk reads: each chunk
Expand All @@ -28,7 +28,7 @@
public record ChunkedLongArray(DType dtype, long length, LongArray[] children, long[] offsets) implements LongArray {

/// Builds a [ChunkedLongArray] from a list of chunk arrays. Nested
/// chunked arrays are flattened; {@link MaskedArray} chunks are unwrapped
/// chunked arrays are flattened; [MaskedArray] chunks are unwrapped
/// to their inner data (validity dropped — matches prior concat behaviour).
///
/// @param dtype logical element type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public record ChunkedShortArray(DType dtype, long length, ShortArray[] children,
/// @param dtype logical element type
/// @param totalRows expected total row count
/// @param chunks non-empty list of chunk arrays
/// @return a new {@link ChunkedShortArray}
/// @return a new [ChunkedShortArray]
/// @throws VortexException on empty input, non-{@link ShortArray} chunks, or row-count mismatch
public static ChunkedShortArray of(DType dtype, long totalRows, List<? extends Array> chunks) {
if (chunks.isEmpty()) {
Expand Down
Loading