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

Function on_error_mixed

datafusion/datasource/src/file_stream/mod.rs:523–599  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

521
522 #[tokio::test]
523 async fn on_error_mixed() -> Result<()> {
524 let batches = FileStreamTest::new()
525 .with_records(vec![make_partition(3), make_partition(2)])
526 .with_num_files(3)
527 .with_on_error(OnError::Skip)
528 .with_open_errors(vec![1])
529 .with_scan_errors(vec![0])
530 .result()
531 .await?;
532
533 #[rustfmt::skip]
534 assert_batches_eq!(&[
535 "+---+",
536 "| i |",
537 "+---+",
538 "| 0 |",
539 "| 1 |",
540 "| 2 |",
541 "| 0 |",
542 "| 1 |",
543 "+---+",
544 ], &batches);
545
546 let batches = FileStreamTest::new()
547 .with_records(vec![make_partition(3), make_partition(2)])
548 .with_num_files(3)
549 .with_on_error(OnError::Skip)
550 .with_open_errors(vec![0])
551 .with_scan_errors(vec![1])
552 .result()
553 .await?;
554
555 #[rustfmt::skip]
556 assert_batches_eq!(&[
557 "+---+",
558 "| i |",
559 "+---+",
560 "| 0 |",
561 "| 1 |",
562 "| 2 |",
563 "| 0 |",
564 "| 1 |",
565 "+---+",
566 ], &batches);
567
568 let batches = FileStreamTest::new()
569 .with_records(vec![make_partition(3), make_partition(2)])
570 .with_num_files(3)
571 .with_on_error(OnError::Skip)
572 .with_open_errors(vec![2])
573 .with_scan_errors(vec![0, 1])
574 .result()
575 .await?;
576
577 #[rustfmt::skip]
578 assert_batches_eq!(&[
579 "++",
580 "++",

Callers

nothing calls this directly

Calls 7

newFunction · 0.85
resultMethod · 0.80
with_scan_errorsMethod · 0.80
with_open_errorsMethod · 0.80
with_num_filesMethod · 0.80
with_recordsMethod · 0.80
with_on_errorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…