feat: Staging table support for MERGE-based updates#243
Merged
phillipleblanc merged 1 commit intotrunkfrom Apr 6, 2026
Merged
Conversation
d49be3b to
ce1c25e
Compare
- Add create_staging_table JSON-RPC method to system-adapter-protocol - AdbcSink accepts optional system adapter client for remote staging table creation - Strip primary_key_columns when SPICEBENCH_ADBC_UPDATE_STRATEGY=staging_table - Gracefully fall back if adapter does not support create_staging_table (METHOD_NOT_FOUND)
ce1c25e to
b715606
Compare
peasee
approved these changes
Apr 6, 2026
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
Add staging table lifecycle support to SpiceBench for MERGE-based updates in the
staging_tableupdate strategy.Changes
system-adapter-protocol:
create_staging_tableJSON-RPC method (request/response types, client, server dispatch)METHOD_NOT_FOUND, the client logs a warning and treats it as a no-op — newer spicebench works against older adaptersetl/sink/adbc:
AdbcSink::new()accepts an optional(Arc<Mutex<SystemAdapterClient>>, Uuid)for remote staging table creation — no separate trait or wrapper neededstaging_merge_update()calls the system adapter client directly when provideddrop_staging_table_best_effortuses SQLDROP TABLE IF EXISTS(no hook needed)run.rs:
AdbcSink::new()primary_key_columnsfrom allDatasetConfigwhenSPICEBENCH_ADBC_UPDATE_STRATEGY=staging_tableso tables are created without PKs (avoids Cayenne autoon_conflict: Upsert)Backward compatibility
The protocol addition is backward compatible: if the adapter doesn't implement
create_staging_table, the client catches theMETHOD_NOT_FOUNDerror, logs a warning, and falls back to implicit table creation via bulk ingest.