{"record":{"id":"5079da72e16e89b1","repo":"dbt-labs/dbt-core","slug":"show-parameters-should-be-matched-globally","errorCode":null,"errorMessage":"SHOW PARAMETERS should be matched globally","messagePattern":"SHOW PARAMETERS should be matched globally","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-adapter/src/time_machine/event_replay.rs","lineNumber":3255,"sourceCode":"        // Recording order: SHOW_PARAMS (0), DATEDIFF_PROBE (1), CREATE_VIEW (2)\n        let recording = make_recording(vec![\n            make_exec(0, show_sql),\n            make_exec(1, probe_sql),\n            make_exec(2, ddl_sql),\n        ]);\n\n        // Strict mode replay: DATEDIFF_PROBE arrives first via global read search\n        let probe_args = serde_json::json!([probe_sql]);\n        let e = recording\n            .take_ro_exec_read(node_id, \"execute\", &probe_args)\n            .expect(\"probe should be matched globally\");\n        assert_eq!(e.seq, 1, \"should match the probe event (seq 1)\");\n\n        // SHOW_PARAMS also arrives out of order; matched globally\n        let show_args = serde_json::json!([show_sql]);\n        let e = recording\n            .take_ro_exec_read(node_id, \"execute\", &show_args)\n            .expect(\"SHOW PARAMETERS should be matched globally\");\n        assert_eq!(e.seq, 0);\n\n        // take_next (strict sequential) should skip seq 0 and seq 1 (already consumed\n        // as read-only execute reads) and return seq 2 (CREATE_VIEW).\n        let e = recording\n            .take_next(node_id)\n            .expect(\"CREATE VIEW should be the next sequential event\");\n        assert_eq!(\n            e.seq, 2,\n            \"take_next should skip ro_exec_matched events and return CREATE_VIEW\"\n        );\n    }\n\n    #[test]\n    fn test_sql_args_match_string_format() {\n        // Test that SQL can be passed as a direct string (not wrapped in array)\n        let sql1 = serde_json::json!(\"SELECT   *  FROM  users\");\n        let sql2 = serde_json::json!(\"SELECT * FROM users\");","sourceCodeStart":3237,"sourceCodeEnd":3273,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-adapter/src/time_machine/event_replay.rs#L3237-L3273","documentation":"Test-only assertion in the strict-mode replay test: SHOW PARAMETERS, also arriving out of order, must be matched via the global read search. Fires only if global matching stops returning events after a prior out-of-order match.","triggerScenarios":"Thrown at crates/dbt-adapter/src/time_machine/event_replay.rs:3255 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure globally matched events are removed from the search index after consumption","Check the global read index update path in take_ro_exec_read","Treat failure as an event-replay matching regression"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}