alamb opened a new issue, #14435:
URL: https://github.com/apache/datafusion/issues/14435

   ### Is your feature request related to a problem or challenge?
   
   The https://datafusion.apache.org/library-user-guide/index.html has some 
great examples ❤ 
   
   However, not all of these examples are actually tested during CI which 
results in issues like this one found (and fixed!) by @nuno-faria 
   - https://github.com/apache/datafusion/issues/14404
   
   It is possible to prevent this type of problem by testing the examples 
automatically, following the instructions here
   
   
https://github.com/apache/datafusion/blob/67bc04cd4237466e11e90304430bdffd6ef1c50e/datafusion/core/src/lib.rs#L819-L844
   
   
   
   ### Describe the solution you'd like
   
   I would like to test all examples in the entire User Guide and Library User 
Guide. 
   
   Here are the files  in the 
[`docs/source/library-user-guide`](https://github.com/apache/datafusion/tree/main/docs/source/library-user-guide)
 directory. The ones that are not checked do not have their examples checked yet
   
   - [ ] `docs/source/library-user-guide/adding-udfs.md`
   - [ ] `docs/source/library-user-guide/api-health.md`
   - [x] `docs/source/library-user-guide/building-logical-plans.md`
   - [ ] `docs/source/library-user-guide/catalogs.md`
   - [ ] `docs/source/library-user-guide/custom-table-providers.md`
   - [ ] `docs/source/library-user-guide/extending-operators.md`
   - [ ] `docs/source/library-user-guide/extensions.md`
   - [ ] `docs/source/library-user-guide/index.md`
   - [ ] `docs/source/library-user-guide/profiling.md`
   - [ ] `docs/source/library-user-guide/query-optimizer.md`
   - [x] `docs/source/library-user-guide/using-the-dataframe-api.md`
   - [x] `docs/source/library-user-guide/using-the-sql-api.md`
   - [ ] `docs/source/library-user-guide/working-with-exprs.md`
   
   
   
   
   
   ### Describe alternatives you've considered
   
   To test the examples on a particular page, such as `adding-udfs.md`
   
   # Step 1: Add entry to `lib.rs`
   
   ```diff
   andrewlamb@Andrews-MacBook-Pro-2:~/Software/datafusion$ git diff
   diff --git a/datafusion/core/src/lib.rs b/datafusion/core/src/lib.rs
   index 780b22983..509ef601c 100644
   --- a/datafusion/core/src/lib.rs
   +++ b/datafusion/core/src/lib.rs
   @@ -873,6 +873,12 @@ doc_comment::doctest!(
        user_guide_expressions
    );
   
   +#[cfg(doctest)]
   +doc_comment::doctest!(
   +    "../../../docs/source/library-user-guide/adding-udfs.md",
   +    library_user_guide_adding_udfs
   +);
   +
    #[cfg(doctest)]
    doc_comment::doctest!(
        "../../../docs/source/library-user-guide/using-the-sql-api.md",
   ```
   
   # Step 2: Run tests:
   ```
   cargo test --doc -- library_user_guide_adding_udfs
   ```
   
   # Step 3: Fix issues / run again
   (iterate and repeat until test passes)
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to