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

Function test_start_mid_line

datafusion/datasource-json/src/boundary_stream.rs:442–457  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

440
441 #[tokio::test]
442 async fn test_start_mid_line() {
443 // start=3, fetch_start=2. Bytes from offset 2: "ne1\nline2\nline3\n".
444 // Should skip "ne1\n" and yield "line2\nline3\n".
445 static DATA: &[u8] = b"line1\nline2\nline3\n";
446 for &cs in CHUNK_SIZES {
447 let (store, path) = make_chunked_store(DATA, cs).await;
448 let s = AlignedBoundaryStream::new(store, path, 3, 100, 18, b'\n')
449 .await
450 .unwrap();
451 assert_eq!(
452 collect_stream(s).await,
453 b"line2\nline3\n",
454 "chunk_size={cs}"
455 );
456 }
457 }
458
459 #[tokio::test]
460 async fn test_end_boundary_mid_line() {

Callers

nothing calls this directly

Calls 2

make_chunked_storeFunction · 0.85
newFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…