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

Function limit_pushdown_with_skip

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

Source from the content-addressed store, hash-verified

440
441 #[test]
442 fn limit_pushdown_with_skip() -> Result<()> {
443 let table_scan = test_table_scan()?;
444 let noop_plan = LogicalPlan::Extension(Extension {
445 node: Arc::new(NoopPlan {
446 input: vec![table_scan.clone()],
447 schema: Arc::clone(table_scan.schema()),
448 }),
449 });
450
451 let plan = LogicalPlanBuilder::from(noop_plan)
452 .limit(10, Some(1000))?
453 .build()?;
454
455 assert_optimized_plan_equal!(
456 plan,
457 @r"
458 Limit: skip=10, fetch=1000
459 NoopPlan
460 Limit: skip=0, fetch=1010
461 TableScan: test, fetch=1010
462 "
463 )
464 }
465
466 #[test]
467 fn limit_pushdown_multiple_limits() -> 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…