alamb commented on code in PR #7956:
URL: https://github.com/apache/arrow-datafusion/pull/7956#discussion_r1385654811
##########
docs/source/library-user-guide/building-logical-plans.md:
##########
@@ -36,35 +36,7 @@ much easier to use the [LogicalPlanBuilder], which is
described in the next sect
Here is an example of building a logical plan directly:
-<!-- source for this example is in
datafusion_docs::library_logical_plan::plan_1 -->
-
-```rust
-// create a logical table source
-let schema = Schema::new(vec![
- Field::new("id", DataType::Int32, true),
- Field::new("name", DataType::Utf8, true),
-]);
-let table_source = LogicalTableSource::new(SchemaRef::new(schema));
-
-// create a TableScan plan
-let projection = None; // optional projection
-let filters = vec![]; // optional filters to push down
-let fetch = None; // optional LIMIT
-let table_scan = LogicalPlan::TableScan(TableScan::try_new(
- "person",
- Arc::new(table_source),
- projection,
- filters,
- fetch,
-)?);
-
-// create a Filter plan that evaluates `id > 500` that wraps the TableScan
-let filter_expr = col("id").gt(lit(500));
-let plan = LogicalPlan::Filter(Filter::try_new(filter_expr,
Arc::new(table_scan))?);
-
-// print the plan
-println!("{}", plan.display_indent_schema());
-```
+<!-- include: library_logical_plan::create_plan -->
Review Comment:
I tried this again and now with this error the script simply doesn't mess
with the section, which I think is fine
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]