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

Function limit_push_down_cross_join

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

Source from the content-addressed store, hash-verified

1032
1033 #[test]
1034 fn limit_push_down_cross_join() -> Result<()> {
1035 let table_scan_1 = test_table_scan()?;
1036 let table_scan_2 = test_table_scan_with_name("test2")?;
1037
1038 let plan = LogicalPlanBuilder::from(table_scan_1)
1039 .cross_join(LogicalPlanBuilder::from(table_scan_2).build()?)?
1040 .limit(0, Some(1000))?
1041 .build()?;
1042
1043 assert_optimized_plan_equal!(
1044 plan,
1045 @r"
1046 Limit: skip=0, fetch=1000
1047 Cross Join:
1048 Limit: skip=0, fetch=1000
1049 TableScan: test, fetch=1000
1050 Limit: skip=0, fetch=1000
1051 TableScan: test2, fetch=1000
1052 "
1053 )
1054 }
1055
1056 #[test]
1057 fn skip_limit_push_down_cross_join() -> Result<()> {

Callers

nothing calls this directly

Calls 5

cross_joinMethod · 0.80
test_table_scanFunction · 0.50
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…