Skip to content

refactor: type writeChunk map keys as ColumnName#201

Merged
dfa1 merged 1 commit into
mainfrom
writechunk-columnname
Jul 6, 2026
Merged

refactor: type writeChunk map keys as ColumnName#201
dfa1 merged 1 commit into
mainfrom
writechunk-columnname

Conversation

@dfa1

@dfa1 dfa1 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

VortexWriter.writeChunk(Map<String, Object>) becomes Map<ColumnName, Object>.

The map's keys must equal schema.fieldNames() — they are the writer's column names — so a raw String key lied about its domain. Typing them:

Callers updated to key chunks by ColumnName: csv/jdbc/parquet importers, calcite + writer tests, performance benchmarks. External boundaries stay String (Calcite table names, JNI writer maps).

./mvnw verify green including the Rust-interop oracle (integration failsafe). Wire bytes unchanged — the writer still stores raw name strings via .value().

🤖 Generated with Claude Code

VortexWriter.writeChunk(Map<String, Object>) became
Map<ColumnName, Object>: the keys must equal schema.fieldNames(),
so String lied about the domain. Now a wrong-order or wrong-name
key is a compile error, and the map form matches the typed builder
and the read path.

Callers across csv/jdbc/parquet importers, calcite/writer tests, and
performance benchmarks updated to key chunks by ColumnName. External
boundaries (Calcite table names, JNI writer maps) stay String.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@dfa1 dfa1 merged commit debf147 into main Jul 6, 2026
6 checks passed
@dfa1 dfa1 deleted the writechunk-columnname branch July 6, 2026 05:50
dfa1 added a commit that referenced this pull request Jul 6, 2026
Follow-up to the writeChunk(Map<ColumnName, Object>) retype (#201) and
the Chunk.put(ColumnName, ...) builder (#200): doc snippets still showed
String keys and would not compile. DocsConsistencyTest is blind to them
(the .put("x", ...) / writeChunk(Map<...>) forms have no dotted receiver
its regex can match), so this was caught in review, not CI.

- reference.md: writeChunk(Map<String, Object>) -> Map<ColumnName, Object>
- README / tutorial / compatibility: .put("x", ...) -> .put(ColumnName.of("x"), ...)
- tutorial: add the ColumnName import
- JdbcImporter.toChunkMap: drop a pointless ColumnName -> String -> ColumnName
  round-trip (List<ColumnName> names = schema.fieldNames())

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant