Open
Conversation
Replace the legacy in-memory Map<DataTable<?>, List<?>> on ExecutionContext with a pluggable DataTableStore interface. This enables different environments to handle data table storage differently: in-memory for tests, streaming to compressed CSV for the CLI, and file-based exchange for RPC. Key changes: - DataTableStore interface with insertRow, getRows (Stream), getDataTables - InMemoryDataTableStore (default), CsvDataTableStore (file-based), NoOpDataTableStore - DataTableExecutionContextView for accessing the store - DataTable gains group (community tables) and instanceName (disambiguation) - CsvDataTableStore writes @name/@instanceName/@group metadata comments - Precondition suppression via DataTableStore.noop() and getMessage interception - RecipeRunStats.flush() uses standard insertRow path - Common recipes (FindMethods, Find, FindTypes, etc.) set instance names - Python/C#/TypeScript stores aligned with idiomatic naming conventions
jkschneider
added a commit
to openrewrite/rewrite-prethink
that referenced
this pull request
Mar 21, 2026
ExportContext and GenerateCalmArchitecture read from DataTableExecutionContextView instead of ctx.getMessage(DATA_TABLES). Depends on: openrewrite/rewrite#7088
jkschneider
added a commit
to openrewrite/rewrite-maven-plugin
that referenced
this pull request
Mar 21, 2026
Replace recipeRun.exportDatatablesToCsv() with CsvDataTableStore set on the ExecutionContext before recipe execution. Depends on: openrewrite/rewrite#7088
jkschneider
added a commit
to openrewrite/rewrite-gradle-plugin
that referenced
this pull request
Mar 21, 2026
Replace recipeRun.exportDatatablesToCsv() with CsvDataTableStore set on the ExecutionContext before recipe execution. Depends on: openrewrite/rewrite#7088
…e API - Regenerate recipes.csv to include instanceName/group fields in DataTableDescriptor - DataTableDescriptor uses @JsonCreator for backward-compatible deserialization - Update C# DataTableTests to use GetRows/GetDataTables instead of removed Rows/AcceptRows
shanman190
reviewed
Mar 21, 2026
rewrite-core/src/main/java/org/openrewrite/CsvDataTableStore.java
Outdated
Show resolved
Hide resolved
| } | ||
| headers.addAll(suffixColumns.keySet()); | ||
|
|
||
| OutputStream os = outputStreamFactory.apply(path); |
Contributor
There was a problem hiding this comment.
callout: File resource leak
Contributor
There was a problem hiding this comment.
It appears that I was wrong about this one. It's a delayed close inside of BucketWriter, so as long as BucketWriter gets closed, then things are good.
Co-authored-by: Shannon Pamperl <shanman190@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Merge Order and Coordinated PRs
Phase 1 — Core (merge first)
Phase 2 — Parallel (after rewrite snapshot)
Phase 3 — SaaS (after CLI + Worker)
Impacts
Breaking: DATA_TABLES constant removed from ExecutionContext. Use DataTableExecutionContextView.
Breaking: RecipeRun.exportDatatablesToCsv() removed. Plugins now set CsvDataTableStore on ctx.
Breaking: DataTableDescriptor has new nullable fields (instanceName, group).
Filenames change: Data table CSV files now include sanitized instance name suffix with 4-char hash.
GraphQL additions (non-breaking): instanceName and group on DataTable types.
CSV metadata: Files start with # @name, # @instanceName, # @group comments.