andygrove commented on code in PR #527:
URL: 
https://github.com/apache/arrow-datafusion-python/pull/527#discussion_r1373235246


##########
src/lib.rs:
##########
@@ -108,8 +112,11 @@ fn _internal(py: Python, m: &PyModule) -> PyResult<()> {
     m.add_submodule(store)?;
 
     // Register substrait as a submodule
+    #[cfg(feature = "substrait")]
     let substrait = PyModule::new(py, "substrait")?;
+    #[cfg(feature = "substrait")]
     substrait::init_module(substrait)?;
+    #[cfg(feature = "substrait")]
     m.add_submodule(substrait)?;

Review Comment:
   nit: we could move this code into a function and then have just one `#[cfg]` 
directive when calling that function



-- 
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]

Reply via email to