alamb commented on code in PR #11324:
URL: https://github.com/apache/datafusion/pull/11324#discussion_r1667768597
##########
datafusion/core/src/lib.rs:
##########
@@ -626,6 +626,12 @@ doc_comment::doctest!(
user_guide_configs
);
+#[cfg(doctest)]
+doc_comment::doctest!(
Review Comment:
runs tests as part of `cargo doc`
##########
docs/source/user-guide/dataframe.md:
##########
@@ -38,73 +51,31 @@ use datafusion::prelude::*;
Here is a minimal example showing the execution of a query using the DataFrame
API.
```rust
-let ctx = SessionContext::new();
-let df = ctx.read_csv("tests/data/example.csv", CsvReadOptions::new()).await?;
-let df = df.filter(col("a").lt_eq(col("b")))?
- .aggregate(vec![col("a")], vec![min(col("b"))])?
- .limit(0, Some(100))?;
-// Print results
-df.show().await?;
+use datafusion::prelude::*;
+use datafusion::error::Result;
+
+#[tokio::main]
+async fn main() -> Result<()> {
+ let ctx = SessionContext::new();
+ let df = ctx.read_csv("tests/data/example.csv",
CsvReadOptions::new()).await?;
+ let df = df.filter(col("a").lt_eq(col("b")))?
+ .aggregate(vec![col("a")], vec![min(col("b"))])?
+ .limit(0, Some(100))?;
+ // Print results
+ df.show().await?;
+ Ok(())
+}
```
-The DataFrame API is well documented in the [API reference on
docs.rs](https://docs.rs/datafusion/latest/datafusion/dataframe/struct.DataFrame.html).
-
-Refer to the [Expressions Reference](expressions) for available functions for
building logical expressions for use with the
-DataFrame API.
-
-## DataFrame Transformations
-
-These methods create a new DataFrame after applying a transformation to the
logical plan that the DataFrame represents.
Review Comment:
These tables are duplicates of what is in the API docs.

I think it is better to send people there (and invest in keeping it up to
date / with examples).
The only thing that is lost is a summary table that breaks the functions
down into `Transformations`, `Actions`, and `other`.
If reviewers feel this content is valuable, I can move the tables to the API
docs
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]