dbt-labs/dbt-core · error

SHOW PARAMETERS should be matched globally

Error message

SHOW PARAMETERS should be matched globally

What it means

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.

Solutions

  1. Ensure globally matched events are removed from the search index after consumption
  2. Check the global read index update path in take_ro_exec_read
  3. Treat failure as an event-replay matching regression
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/dbt-adapter/src/time_machine/event_replay.rs:3255 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/5079da72e16e89b1. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-adapter/src/time_machine/event_replay.rs:3255

        // Recording order: SHOW_PARAMS (0), DATEDIFF_PROBE (1), CREATE_VIEW (2)
        let recording = make_recording(vec![
            make_exec(0, show_sql),
            make_exec(1, probe_sql),
            make_exec(2, ddl_sql),
        ]);

        // Strict mode replay: DATEDIFF_PROBE arrives first via global read search
        let probe_args = serde_json::json!([probe_sql]);
        let e = recording
            .take_ro_exec_read(node_id, "execute", &probe_args)
            .expect("probe should be matched globally");
        assert_eq!(e.seq, 1, "should match the probe event (seq 1)");

        // SHOW_PARAMS also arrives out of order; matched globally
        let show_args = serde_json::json!([show_sql]);
        let e = recording
            .take_ro_exec_read(node_id, "execute", &show_args)
            .expect("SHOW PARAMETERS should be matched globally");
        assert_eq!(e.seq, 0);

        // take_next (strict sequential) should skip seq 0 and seq 1 (already consumed
        // as read-only execute reads) and return seq 2 (CREATE_VIEW).
        let e = recording
            .take_next(node_id)
            .expect("CREATE VIEW should be the next sequential event");
        assert_eq!(
            e.seq, 2,
            "take_next should skip ro_exec_matched events and return CREATE_VIEW"
        );
    }

    #[test]
    fn test_sql_args_match_string_format() {
        // Test that SQL can be passed as a direct string (not wrapped in array)
        let sql1 = serde_json::json!("SELECT   *  FROM  users");
        let sql2 = serde_json::json!("SELECT * FROM users");

View on GitHub (pinned to 0267ce9170)