You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ag...@apache.org on 2023/06/26 17:24:18 UTC

[arrow-datafusion] branch main updated: Re-export modules individually to fix rustdocs (#6757)

This is an automated email from the ASF dual-hosted git repository.

agrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 1522e7a58e Re-export modules individually to fix rustdocs (#6757)
1522e7a58e is described below

commit 1522e7a58e801b87a0f8f5c6187a2038453eba9d
Author: Andrew Lamb <an...@nerdnetworks.org>
AuthorDate: Mon Jun 26 13:24:11 2023 -0400

    Re-export modules individually to fix rustdocs (#6757)
    
    * Re-export modules directly to fix rustdocs
    
    * fix
    
    * Add comments
---
 datafusion/core/src/lib.rs | 49 ++++++++++++++++++++++++++++++++++++----------
 1 file changed, 39 insertions(+), 10 deletions(-)

diff --git a/datafusion/core/src/lib.rs b/datafusion/core/src/lib.rs
index 0accf77399..ad2435f9c1 100644
--- a/datafusion/core/src/lib.rs
+++ b/datafusion/core/src/lib.rs
@@ -430,19 +430,48 @@ pub mod prelude;
 pub mod scalar;
 pub mod variable;
 
-// re-export dependencies from arrow-rs to minimise version maintenance for crate users
+// re-export dependencies from arrow-rs to minimize version maintenance for crate users
 pub use arrow;
 pub use parquet;
 
-// re-export DataFusion crates
-pub use datafusion_common as common;
-pub use datafusion_common::config;
-pub use datafusion_execution;
-pub use datafusion_expr as logical_expr;
-pub use datafusion_optimizer as optimizer;
-pub use datafusion_physical_expr as physical_expr;
-pub use datafusion_row as row;
-pub use datafusion_sql as sql;
+// re-export DataFusion sub-crates at the top level. Use `pub use *`
+// so that the contents of the subcrates appears in rustdocs
+// for details, see https://github.com/apache/arrow-datafusion/issues/6648
+
+/// re-export of [`datafusion_common`] crate
+pub mod common {
+    pub use datafusion_common::*;
+}
+
+// Backwards compatibility
+pub use common::config;
+
+// NB datafusion execution is re-exported in the `execution` module
+
+/// re-export of [`datafusion_expr`] crate
+pub mod logical_expr {
+    pub use datafusion_expr::*;
+}
+
+/// re-export of [`datafusion_optimizer`] crate
+pub mod optimizer {
+    pub use datafusion_optimizer::*;
+}
+
+/// re-export of [`datafusion_physical_expr`] crate
+pub mod physical_expr {
+    pub use datafusion_physical_expr::*;
+}
+
+/// re-export of [`datafusion_row`] crate
+pub mod row {
+    pub use datafusion_row::*;
+}
+
+/// re-export of [`datafusion_sql`] crate
+pub mod sql {
+    pub use datafusion_sql::*;
+}
 
 #[cfg(test)]
 pub mod test;