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

Function read_limit

datafusion/core/src/datasource/file_format/json.rs:130–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128
129 #[tokio::test]
130 async fn read_limit() -> Result<()> {
131 let session_ctx = SessionContext::new();
132 let state = session_ctx.state();
133 let task_ctx = state.task_ctx();
134 let projection = None;
135 let exec = get_exec(&state, projection, Some(1)).await?;
136 let batches = collect(exec, task_ctx).await?;
137 assert_eq!(1, batches.len());
138 assert_eq!(4, batches[0].num_columns());
139 assert_eq!(1, batches[0].num_rows());
140
141 Ok(())
142 }
143
144 #[tokio::test]
145 async fn infer_schema() -> Result<()> {

Callers

nothing calls this directly

Calls 5

newFunction · 0.85
get_execFunction · 0.70
collectFunction · 0.50
stateMethod · 0.45
task_ctxMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…