()
| 2104 | |
| 2105 | #[test] |
| 2106 | fn table_limit() -> Result<()> { |
| 2107 | let table_scan = test_table_scan()?; |
| 2108 | assert_eq!(3, table_scan.schema().fields().len()); |
| 2109 | assert_fields_eq(&table_scan, vec!["a", "b", "c"]); |
| 2110 | |
| 2111 | let plan = LogicalPlanBuilder::from(table_scan) |
| 2112 | .project(vec![col("c"), col("a")])? |
| 2113 | .limit(0, Some(5))? |
| 2114 | .build()?; |
| 2115 | |
| 2116 | assert_fields_eq(&plan, vec!["c", "a"]); |
| 2117 | |
| 2118 | assert_optimized_plan_equal!( |
| 2119 | plan, |
| 2120 | @r" |
| 2121 | Limit: skip=0, fetch=5 |
| 2122 | Projection: test.c, test.a |
| 2123 | TableScan: test projection=[a, c] |
| 2124 | " |
| 2125 | ) |
| 2126 | } |
| 2127 | |
| 2128 | #[test] |
| 2129 | fn table_scan_without_projection() -> Result<()> { |
nothing calls this directly
no test coverage detected
searching dependent graphs…