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

Function limit_push_down_sort

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

Source from the content-addressed store, hash-verified

627
628 #[test]
629 fn limit_push_down_sort() -> Result<()> {
630 let table_scan = test_table_scan()?;
631
632 let plan = LogicalPlanBuilder::from(table_scan)
633 .sort_by(vec![col("a")])?
634 .limit(0, Some(10))?
635 .build()?;
636
637 // Should push down limit to sort
638 assert_optimized_plan_equal!(
639 plan,
640 @r"
641 Limit: skip=0, fetch=10
642 Sort: test.a ASC NULLS LAST, fetch=10
643 TableScan: test
644 "
645 )
646 }
647
648 #[test]
649 fn limit_push_down_sort_skip() -> Result<()> {

Callers

nothing calls this directly

Calls 4

test_table_scanFunction · 0.50
buildMethod · 0.45
limitMethod · 0.45
sort_byMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…