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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Vortex now ships with **no FlatBuffers or Protobuf runtime dependency**: the `.f

### Changed

- **Breaking:** every `vortex-core` type now lives under `io.github.dfa1.vortex.core.*` — `core.model` (`DType`, `PType`, `TimeUnit`, `EncodingId`, `ExtensionId`, `TimeDtype`, `TimestampDtype`), `core.io` (`IoBounds`, `PTypeIO`, `VortexFormat`), `core.error` (`VortexException`), `core.compute` (`FastLanes`, `PrimitiveArrays`), and `core.fbs` / `core.proto` for the wire codecs. Update imports accordingly (e.g. `io.github.dfa1.vortex.core.DType` → `io.github.dfa1.vortex.core.model.DType`).
- Removed the `com.google.flatbuffers:flatbuffers-java` runtime dependency. The `.fbs`/`.proto` schemas are now compiled in-house to `MemorySegment`-native Java, dropping the last automatic-module dependency so a named JPMS `module-info` is viable (ADR 0017).
- Generated FlatBuffers/Protobuf wire classes are prefixed `Fbs*`/`Proto*`, so the generic type names (`Array`, `Buffer`, `DType`, `Null`, …) no longer collide on the consumer classpath.

Expand Down
12 changes: 8 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ Benchmark classes follow this: `JavaVsJni{Read,Write,Filter}Benchmark`,
## Module structure

```
core — DType, PType, VortexException, VortexFormat + generated fbs/proto
encoding: EncodingId, TimeUnit, PTypeIO extension: ExtensionId
core — everything lives under `io.github.dfa1.vortex.core.*`:
core.model DType, PType, TimeUnit, EncodingId, ExtensionId, TimeDtype, TimestampDtype
core.io IoBounds, PTypeIO, VortexFormat
core.error VortexException
core.compute FastLanes, PrimitiveArrays
core.fbs / core.proto — generated wire codecs + their runtimes
reader — VortexReader, VortexHttpReader, VortexHandle, ReadRegistry, ExtensionDecoder,
Chunk, ArrayStats, ScanOptions, RowFilter; file internals (Footer, Layout, Trailer,
PostscriptParser, …)
Expand Down Expand Up @@ -71,7 +75,7 @@ Both schema languages are compiled in-process to MemorySegment-native Java, with
`flatc`/`protoc` and no `com.google.flatbuffers`/`protobuf-java` runtime (ADR 0017):
- **`.fbs` → `fbs-gen`** (`io.github.dfa1.vortex.fbsgen`): generates readers extending
`FbsTable`/`FbsStruct` and builders over `FbsBuilder`, all in the same generated package
`io.github.dfa1.vortex.fbs`. The runtime base classes `FbsTable`/`FbsStruct` are
`io.github.dfa1.vortex.core.fbs`. The runtime base classes `FbsTable`/`FbsStruct` are
package-private (only generated readers extend them); `FbsBuilder` is public because the
writer module assembles FlatBuffers with it.
- **`.proto` → `proto-gen`**: one record per message with static `decode(MemorySegment, long,
Expand Down Expand Up @@ -246,7 +250,7 @@ MemorySegment metaSeg = MemorySegment.ofBuffer(ctx.metadata().duplicate());
FooMetadata meta = FooMetadata.decode(metaSeg, 0, metaSeg.byteSize());
```

Generated proto records live in `io.github.dfa1.vortex.proto`; the runtime (`ProtoReader`,
Generated proto records live in `io.github.dfa1.vortex.core.proto`; the runtime (`ProtoReader`,
`ProtoWriter`) is package-private. For oneof messages (e.g. `ScalarValue`) prefer the static
`ofXxxValue(v)` factory over the multi-arg constructor.

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Maven Central metadata.
In scope:

- Any malformed `.vortex` input that causes the reader to throw an exception other than
`io.github.dfa1.vortex.core.VortexException` (e.g. `IndexOutOfBoundsException`,
`io.github.dfa1.vortex.core.error.VortexException` (e.g. `IndexOutOfBoundsException`,
`NegativeArraySizeException`, `OutOfMemoryError`, `StackOverflowError`, raw FlatBuffer
runtime exceptions, raw `IOException` from the proto3 reader, or a JVM crash via the FFM layer).
- Any malformed `.vortex` input that causes the reader to allocate memory disproportionate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static int run(String[] args) {
CsvExporter.exportCsvFiltered(path, stdout, ExportOptions.defaults(), scanOptions, rowPred);
stdout.flush();
return ExitStatus.OK;
} catch (IOException | io.github.dfa1.vortex.core.VortexException e) {
} catch (IOException | io.github.dfa1.vortex.core.error.VortexException e) {
// VortexException is unchecked but surfaces user-facing failures (e.g. unknown
// column on a typo'd filter); catching it here keeps the CLI from dumping a
// stack trace and lets shell pipelines branch on the exit code.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.dfa1.vortex.cli;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.reader.VortexReader;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dfa1.vortex.cli;

import io.github.dfa1.vortex.reader.ArrayStats;
import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.reader.VortexReader;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dfa1.vortex.cli.tui;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.extension.ExtensionId;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.core.model.ExtensionId;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.reader.array.BoolArray;
import io.github.dfa1.vortex.reader.array.ByteArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dfa1.vortex.cli.tui;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.extension.ExtensionId;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.core.model.ExtensionId;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.reader.array.BoolArray;
import io.github.dfa1.vortex.reader.array.ByteArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dfa1.vortex.cli.tui;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.VortexException;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.core.error.VortexException;
import io.github.dfa1.vortex.reader.Chunk;
import io.github.dfa1.vortex.reader.ScanIterator;
import io.github.dfa1.vortex.reader.ScanOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import io.github.dfa1.vortex.reader.Layout;
import io.github.dfa1.vortex.reader.SegmentSpec;
import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.cli.tui.term.Ansi;
import io.github.dfa1.vortex.cli.tui.term.Key;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.dfa1.vortex.cli;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.writer.VortexWriter;
import io.github.dfa1.vortex.writer.WriteOptions;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dfa1.vortex.cli;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.PType;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.core.model.PType;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dfa1.vortex.cli.tui;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.PType;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.core.model.PType;
import io.github.dfa1.vortex.reader.array.BoolArray;
import io.github.dfa1.vortex.reader.array.ByteArray;
import io.github.dfa1.vortex.reader.array.DoubleArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dfa1.vortex.cli.tui;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.encoding.TimeUnit;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.core.model.TimeUnit;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.reader.array.ByteArray;
import io.github.dfa1.vortex.reader.array.FixedSizeListArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.dfa1.vortex.cli.tui;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.PType;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.core.model.PType;
import io.github.dfa1.vortex.reader.array.Array;
import io.github.dfa1.vortex.reader.array.GenericArray;
import io.github.dfa1.vortex.reader.array.IntArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.dfa1.vortex.cli.tui;

import io.github.dfa1.vortex.core.VortexException;
import io.github.dfa1.vortex.core.error.VortexException;
import io.github.dfa1.vortex.reader.VortexHandle;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.dfa1.vortex.cli.tui;

import io.github.dfa1.vortex.core.DType;
import io.github.dfa1.vortex.core.model.DType;
import io.github.dfa1.vortex.reader.VortexHandle;
import io.github.dfa1.vortex.reader.VortexReader;
import io.github.dfa1.vortex.writer.VortexWriter;
Expand Down
8 changes: 4 additions & 4 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<argument>${project.basedir}/../fbs-gen/target/classes</argument>
<argument>io.github.dfa1.vortex.fbsgen.Main</argument>
<argument>--out</argument>
<argument>${project.basedir}/src/main/java/io/github/dfa1/vortex/fbs</argument>
<argument>${project.basedir}/src/main/java/io/github/dfa1/vortex/core/fbs</argument>
<argument>${project.basedir}/src/main/fbs/array.fbs</argument>
<argument>${project.basedir}/src/main/fbs/dtype.fbs</argument>
<argument>${project.basedir}/src/main/fbs/footer.fbs</argument>
Expand All @@ -112,7 +112,7 @@
<argument>${project.basedir}/../proto-gen/target/classes</argument>
<argument>io.github.dfa1.vortex.protogen.Main</argument>
<argument>--out</argument>
<argument>${project.basedir}/src/main/java/io/github/dfa1/vortex/proto</argument>
<argument>${project.basedir}/src/main/java/io/github/dfa1/vortex/core/proto</argument>
<argument>${project.basedir}/src/main/proto/dtype.proto</argument>
<argument>${project.basedir}/src/main/proto/scalar.proto</argument>
<argument>${project.basedir}/src/main/proto/encodings.proto</argument>
Expand All @@ -138,8 +138,8 @@
<artifactId>pitest-maven</artifactId>
<configuration>
<targetClasses>
<param>io.github.dfa1.vortex.core.IoBounds</param>
<param>io.github.dfa1.vortex.encoding.PTypeIO</param>
<param>io.github.dfa1.vortex.core.io.IoBounds</param>
<param>io.github.dfa1.vortex.core.io.PTypeIO</param>
</targetClasses>
</configuration>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/fbs/array.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/// An Array describes the hierarchy of an array as well as the locations of the data buffers that appear
/// immediately after the message in the byte stream.
namespace io.github.dfa1.vortex.fbs;
namespace io.github.dfa1.vortex.core.fbs;

table Array {
/// The array's hierarchical definition.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/fbs/dtype.fbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors

namespace io.github.dfa1.vortex.fbs;
namespace io.github.dfa1.vortex.core.fbs;

enum PType: uint8 {
U8,
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/fbs/footer.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
include "array.fbs";
include "layout.fbs";

namespace io.github.dfa1.vortex.fbs;
namespace io.github.dfa1.vortex.core.fbs;

// [postscript]
/// The `Postscript` is guaranteed by the file format to never exceed
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/fbs/layout.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/// `encoding` to embed additional information that may be useful for the reader. For example, the `ChunkedLayout`
/// uses the first byte of the `metadata` array as a boolean to indicate whether the first child Layout represents
/// the statistics table for the other chunks.
namespace io.github.dfa1.vortex.fbs;
namespace io.github.dfa1.vortex.core.fbs;

table Layout {
/// The ID of the encoding used for this Layout.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.dfa1.vortex.encoding;
package io.github.dfa1.vortex.core.compute;

import io.github.dfa1.vortex.core.PType;
import io.github.dfa1.vortex.core.model.PType;

/// Shared FastLanes layout constants and index math used by the bit-packing and delta encodings on
/// both the read and write sides.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package io.github.dfa1.vortex.encoding;
package io.github.dfa1.vortex.core.compute;

import io.github.dfa1.vortex.core.PType;
import io.github.dfa1.vortex.core.VortexException;
import io.github.dfa1.vortex.core.model.PType;
import io.github.dfa1.vortex.core.model.EncodingId;
import io.github.dfa1.vortex.core.io.PTypeIO;
import io.github.dfa1.vortex.core.error.VortexException;

import java.lang.foreign.MemorySegment;
import java.lang.foreign.SegmentAllocator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.dfa1.vortex.core;
package io.github.dfa1.vortex.core.error;

import io.github.dfa1.vortex.encoding.EncodingId;
import io.github.dfa1.vortex.core.model.EncodingId;

import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import static io.github.dfa1.vortex.encoding.PTypeIO.LE_DOUBLE;
import static io.github.dfa1.vortex.encoding.PTypeIO.LE_FLOAT;
import static io.github.dfa1.vortex.encoding.PTypeIO.LE_INT;
import static io.github.dfa1.vortex.encoding.PTypeIO.LE_LONG;
import static io.github.dfa1.vortex.encoding.PTypeIO.LE_SHORT;
import static io.github.dfa1.vortex.core.io.PTypeIO.LE_DOUBLE;
import static io.github.dfa1.vortex.core.io.PTypeIO.LE_FLOAT;
import static io.github.dfa1.vortex.core.io.PTypeIO.LE_INT;
import static io.github.dfa1.vortex.core.io.PTypeIO.LE_LONG;
import static io.github.dfa1.vortex.core.io.PTypeIO.LE_SHORT;

import java.lang.foreign.MemorySegment;
import java.lang.foreign.ValueLayout;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import javax.annotation.processing.Generated;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import javax.annotation.processing.Generated;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Generated by vortex-fbs-gen. Do not edit.

package io.github.dfa1.vortex.fbs;
package io.github.dfa1.vortex.core.fbs;

import java.lang.foreign.MemorySegment;
import javax.annotation.processing.Generated;
Expand Down
Loading