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

Function limit_pushdown_basic

datafusion/optimizer/src/push_down_limit.rs:417–439  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

415 }
416 #[test]
417 fn limit_pushdown_basic() -> Result<()> {
418 let table_scan = test_table_scan()?;
419 let noop_plan = LogicalPlan::Extension(Extension {
420 node: Arc::new(NoopPlan {
421 input: vec![table_scan.clone()],
422 schema: Arc::clone(table_scan.schema()),
423 }),
424 });
425
426 let plan = LogicalPlanBuilder::from(noop_plan)
427 .limit(0, Some(1000))?
428 .build()?;
429
430 assert_optimized_plan_equal!(
431 plan,
432 @r"
433 Limit: skip=0, fetch=1000
434 NoopPlan
435 Limit: skip=0, fetch=1000
436 TableScan: test, fetch=1000
437 "
438 )
439 }
440
441 #[test]
442 fn limit_pushdown_with_skip() -> Result<()> {

Callers

nothing calls this directly

Calls 6

ExtensionClass · 0.85
newFunction · 0.85
test_table_scanFunction · 0.50
schemaMethod · 0.45
buildMethod · 0.45
limitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…