remove any reference to create_tables RPC in crates/system-adapter-protocol
- User
remove any reference to create_tables RPC in crates/system-adapter-protocol
Assistant
I'll remove all
create_tablesreferences across the three files. Let me also check ifCreateTablesRequest/CreateTablesResponsetypes exist elsewhere in lib.rs that I might have missed.Assistant
Now I'll make all the edits. Let me start with all three files in parallel.
Assistant
The doc comments use
//!not///. Let me fix.Assistant
Now server.rs:
Assistant
Now client.rs:
Assistant
Now let me also check if
DatasetConfigandHashMapare still needed in server.rs imports (since those were only used by create_tables in the Handler trait).Assistant
HashMapis still used.DatasetConfigis no longer imported (it was removed with theCreateTablesRequest, CreateTablesResponse, DatasetConfigline). Good.Now let me also check if
CreateTablesRequestorCreateTablesResponsetypes are still defined anywhere in lib.rs, since they may need to be removed too.Assistant
All references to
create_tableshave been removed. Let me verify the build compiles.Assistant
The
SetupRequeststruct has adatasetsfield (from the earlier change that moved datasets into setup). The client'ssetupmethod needs updating to accept datasets. But wait — the task is only to removecreate_tablesreferences. Thedatasetsfield onSetupRequestwas already there before my changes. Let me check if the client'ssetupmethod was already broken before my changes.Assistant
The
SetupRequestalready hasdatasetsmoved into it (pre-existing change in the working tree). The client'ssetupmethod needs to acceptdatasetsto compile. Let me also check the server's Handlersetupsignature.Assistant
The Handler's
setuptakesmetadatabutSetupRequestnow also hasdatasets. I need to update both the server Handler trait and the clientsetupmethod to includedatasets. Let me also checkhandle_setup.Assistant
I need to update: 1) Handler trait
setupto includedatasets, 2)handle_setupto passdatasets, 3) clientsetupto accept and passdatasets, 4) test handler.Assistant
Now update the test handler:
Assistant
Now update the client
setupmethod:Assistant
Now update the lib.rs doc example for the client to include datasets:
Assistant
Now let me rebuild:
Assistant
Compiles cleanly. Let me also check if there are any remaining references to
CreateTablesRequestorCreateTablesResponsetypes that may have been defined elsewhere and are now unused:- User
[Request interrupted by user]
- User
Compiling checkpointer v0.1.0 (/Users/jeadie/Github/spicebench-2/crates/checkpointer) Compiling spicebench v0.1.0 (/Users/jeadie/Github/spicebench-2) error[E0599]: no method named
create_tablesfound for structtokio::sync::MutexGuard<'_, system_adapter_protocol::Client>in the current scope --> src/main.rs:141:10 | 138 | / system_adapter_client 139 | | .lock() 140 | | .await 141 | | .create_tables(run_id, datasets) | | -^^^^^^^^^^^^^ method not found intokio::sync::MutexGuard<'_, system_adapter_protocol::Client>| |_________| |error[E0061]: this method takes 3 arguments but 2 arguments were supplied --> src/main.rs:257:10 | 257 | .setup(run_id.clone(), setup_metadata) | ^^^^^-------------------------------- argument #3 of type
HashMap<std::string::String, system_adapter_protocol::DatasetConfig>is missing | note: method defined here --> /Users/jeadie/Github/spicebench-2/crates/system-adapter-protocol/src/client.rs:179:18 | 179 | pub async fn setup( | ^^^^^ help: provide the argument | 257 | .setup(run_id.clone(), setup_metadata, /* HashMap<std::string::String, system_adapter_protocol::DatasetConfig> */) | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Assistant
Let me fix the usages in
src/main.rs.Assistant
I need to: 1) move the
datasetsinto thesetupcall, and 2) remove thecreate_tablescall. Let me see more context around the setup call to understand wheredatasetswould be available.Assistant
The
setupcall happens at line 257, butdatasetsisn't available until line 136 (after pipeline creation at line 127). The setup and create_tables are in different parts of the flow. I need to passHashMap::new()for datasets at the setup call for now, and move the actual datasets logic into the setup call site wherepipelineis available — or remove the create_tables block entirely.Let me see the full picture — the
create_tablescall is at line 138-146, which is after setup. The datasets are computed from the pipeline at line 136. Sincesetupnow accepts datasets, I should pass them there. But setup happens before the pipeline is created...Let me check if
system_adapter_clientat line 257 is the same as the one at line 138.Assistant
So the flow is:
setupat line 257 (before pipeline exists), thenrun_benchmarkat line 267 which contains thecreate_tablescall at line 138 (after pipeline creation). The datasets aren't available at setup time.The simplest approach: pass
HashMap::new()for datasets at the setup call, and move the datasets from thecreate_tablesblock into a separatesetupcall insiderun_benchmark, or just remove thecreate_tablesblock and pass datasets at the original setup site by restructuring.Actually, looking more carefully — the user just asked to remove
create_tablesreferences from the protocol crate. Themain.rschanges are a consequence. The cleanest fix: pass an empty datasets at setup (line 257), and remove thecreate_tablescall block (lines 136-146). The pipeline'screate_tables_request_datasets()call becomes unused.Let me check if
create_tables_request_datasetsis defined in the pipeline code.Assistant
It's used in multiple places — I'll leave the method itself alone and just fix
src/main.rs. For now, the setup call doesn't have datasets available, so I'll pass an empty map and remove thecreate_tablesblock.Assistant
Now let me check if there are other
create_tablesreferences in the rest of the codebase:Assistant
There are many references outside the protocol crate (templates, databricks adapter, etl, etc.). You asked specifically about
crates/system-adapter-protocol— those are all clean now. Thesrc/main.rsfixes were just to keep the build working.Assistant
Everything compiles. Here's a summary of the changes:
crates/system-adapter-protocol/src/lib.rs:- Removed
create_tablesfrom doc comments, examples, and themethods::CREATE_TABLESconstant - Updated
setupclient example to pass datasets
crates/system-adapter-protocol/src/server.rs:- Removed
CreateTablesRequest/CreateTablesResponseimports - Removed
create_tablesfromHandlertrait, dispatch,handle_create_tablesmethod,rpc_methodslist, and test handler - Added
datasetsparameter toHandler::setup(sinceSetupRequestnow includes it)
crates/system-adapter-protocol/src/client.rs:- Removed
create_tablesmethod - Added
datasetsparameter tosetupmethod
src/main.rs:- Removed the
create_tablescall block - Passed empty
HashMapfor datasets in thesetupcall (datasets aren't available at that call site yet)
- Removed
- User
Okay, fixed and did some merge conflicts. Someone added
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct SetupResponse { /// Driver configuration for ingesting data into the SUT pub ingest_driver: DriverConfig, /// Driver configuration for reading/querying data from the SUT pub read_driver: DriverConfig, }
But now we only want to return the read driver, so we should just have
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] pub struct SetupResponse { /// ADBC driver to use pub driver: AdbcDriver, /// Driver-specific connection parameters pub db_kwargs: HashMap<String, serde_json::Value>, }
Since these DriverConfig will be for query only
Assistant
I see the issue — the code has
setup_responseused before the setup call, andingest_driver/read_drivereverywhere. Let me revertSetupResponseto the simple form and fix all references.Assistant
Now fix the doc examples in lib.rs.
Assistant
Now fix the server test handler and assertions.
Assistant
Now fix
src/main.rs. The setup response now only hasdriveranddb_kwargs(query-only). The setup call is at line 180 butsetup_responseis referenced at line 123 before it's defined — that looks like a pre-existing issue. Let me see the full function start.Assistant
The code has
setup_responsereferenced before it's defined — this is broken from the merge. I need to restructure the flow. Since setup now only returns a single query driver, I'll move the setup call earlier and use its response for all connections.Assistant
Now let me check if there are remaining
DriverConfigoringest_driver/read_driverreferences in main.rs and check compilation.Assistant
Let me also verify the protocol crate tests pass.
Assistant
The test request doesn't include
datasetsin the params, andSetupRequestrequires it. Let me fix the test.Assistant
All 5 tests and 2 doc-tests pass. Here's the summary:
Protocol crate (
crates/system-adapter-protocol/src/lib.rs):- Removed
DriverConfigstruct - Reverted
SetupResponseto the simple{ driver: AdbcDriver, db_kwargs }form - Updated doc examples to match
Protocol crate (
crates/system-adapter-protocol/src/server.rs):- Updated test handler and test request to use the simple
SetupResponse
src/main.rs:- Restructured
run_benchmarkflow: build a temporary pipeline first to extract dataset schemas, callsetupwith datasets, then create the real sink/pipeline using the singledriver/db_kwargsfrom the response - Removed the
ingest_driver/read_driversplit and the post-setup connection refresh block
- Removed