Skip to content

Add concurrent per-column filling API - #4

Merged
k-barseghyan merged 3 commits into
mainfrom
feature/per-column-filling
Aug 21, 2026
Merged

k-barseghyan merged 3 commits into
mainfrom
feature/per-column-filling

Conversation

@k-barseghyan

Copy link
Copy Markdown
Member

Summary

Adds a generated synchronous per-column filling API that allows callers to populate distinct columns concurrently.

The existing row-oriented and batch APIs remain available and unchanged.

API

TradeStore store = TradeStore.create(expectedSize);
TradeStore.ColumnAppender columns = store.columnAppender();

columns.timestamp(timestampValues);
columns.price(priceValues, fromIndex, toIndex);
columns.symbol(symbolValues);

store.seal();

Semantics

  • Each call copies its values synchronously and does not retain the source array.
  • Different columns may be filled concurrently.
  • Calls targeting the same column must be externally serialized.
  • Each column maintains its own count and capacity.
  • Row/batch mutation and per-column mutation cannot be mixed on the same store.
  • The store creates no executors, futures, latches, phasers, or cyclic barriers.
  • The caller owns task execution and joins all column tasks before calling seal().
  • seal() never waits. It validates that all column counts are equal and remains retryable when validation fails.
  • columnAppender() returns the same store-owned appender instance.

Compatibility

  • Preserves the published 1.2.0 generated constructors, factories, row append, batch append, cursor, view, and sealing APIs.
  • Adds columnAppender() as a Java 8 default method so previously compiled external implementations continue to link.
  • External implementations that do not support the new capability receive UnsupportedOperationException.
  • Handles nested generated-name collisions, including legal top-level types containing $, while keeping incremental generation stable.
  • Documents and tests the source-compatibility boundary for implementations that already declare an incompatible columnAppender() method.

Verification

  • ./mvnw clean verify: 146 tests passed.
  • Strict project and generated-source Javadocs passed.
  • Generated stores and consumers compile with javac --release 8.
  • Generated class files use Java 8 bytecode, major version 52.
  • Compatibility was checked against the published 1.2.0 artifacts and precompiled 1.2 consumers and implementations.
  • Collision, incremental-generation, named-module, artifact-boundary, and 1,500-column schema tests passed.
  • Generated sources contain no executor, future, completion-stage, latch, phaser, or barrier dependencies.
  • Native JDK 8 execution remains covered by the Java 8 CI job.

Closes #2

@k-barseghyan
k-barseghyan merged commit 4e0fdb0 into main Aug 21, 2026
5 checks passed
@k-barseghyan
k-barseghyan deleted the feature/per-column-filling branch August 21, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Column-wise concurrency support for batch import

1 participant