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. 
   
   ![Screenshot 2024-07-07 at 5 36 09 
PM](https://github.com/apache/datafusion/assets/490673/a22741a2-ae64-4ec1-9d0c-c3bea249b86e)
   
   
   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]

Reply via email to