MCPcopy Create free account
hub / github.com/apache/datafusion / verify_reports_result_mismatch_context

Function verify_reports_result_mismatch_context

benchmarks/src/sql_benchmark.rs:3412–3441  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3410
3411 #[tokio::test]
3412 async fn verify_reports_result_mismatch_context() {
3413 let mut benchmark = parse_benchmark(
3414 r#"
3415run
3416SELECT 1 AS value
3417
3418result_query I
3419SELECT 1 AS value
3420----
34212
3422"#,
3423 )
3424 .await
3425 .expect("benchmark should parse");
3426 let ctx = SessionContext::new();
3427
3428 benchmark.run(&ctx, true).await.expect("run should succeed");
3429
3430 let error = benchmark
3431 .verify(&ctx)
3432 .await
3433 .expect_err("verify should fail");
3434 let message = error.to_string();
3435 assert!(
3436 message.contains("row 1, column 1")
3437 && message.contains("expected value \"2\"")
3438 && message.contains("got value \"1\""),
3439 "unexpected error: {message}"
3440 );
3441 }
3442
3443 // Persistence tests cover CSV writing and persist-time error paths.
3444

Callers

nothing calls this directly

Calls 5

parse_benchmarkFunction · 0.85
newFunction · 0.85
runMethod · 0.45
verifyMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…