kmitchener commented on issue #8844:
URL: 
https://github.com/apache/arrow-datafusion/issues/8844#issuecomment-1915288944

   I'm working on a solution to this -- it's caused by workspace feature 
resolution. If any crate in the workspace includes datafusion or 
datafusion-common with default features, it causes `cargo build 
--no-default-features` from the workspace root to build datafusion-common with 
parquet support which breaks datafusion-proto during a workspace build with 
this strange error:
   
   ```pre
      Compiling datafusion-proto v35.0.0 
(/home/kmitchener/dev/arrow-datafusion/datafusion/proto)
   error[E0004]: non-exhaustive patterns: 
`&datafusion_common::FileTypeWriterOptions::Parquet(_)` not covered
      --> datafusion/proto/src/physical_plan/to_proto.rs:904:31
       |
   904 |         let file_type = match opts {
       |                               ^^^^ pattern 
`&datafusion_common::FileTypeWriterOptions::Parquet(_)` not covered
       |
   note: `datafusion_common::FileTypeWriterOptions` defined here
      --> 
/home/kmitchener/dev/arrow-datafusion/datafusion/common/src/file_options/mod.rs:150:1
       |
   150 | pub enum FileTypeWriterOptions {
       | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   151 |     #[cfg(feature = "parquet")]
   152 |     Parquet(ParquetWriterOptions),
       |     ------- not covered
       = note: the matched value is of type 
`&datafusion_common::FileTypeWriterOptions`
   help: ensure that all possible cases are being handled by adding a match arm 
with a wildcard pattern or an explicit pattern as shown
       |
   934 ~             },
   935 +             &datafusion_common::FileTypeWriterOptions::Parquet(_) => 
todo!()
       |
   
   For more information about this error, try `rustc --explain E0004`.
   error: could not compile `datafusion-proto` (lib) due to previous error
   ```
   
   The `benchmark` crate includes datafusion and datafusion-common with default 
features, since it needs the parquet support. I think the only way to resolve 
this is to exclude the benchmark crate from the workspace, similar to how 
datafusion-cli is excluded. The other crates should be ok -- `substrait` may 
need some additional  `#[cfg(feature = "parquet")]` flags set to work properly, 
similar to flags added to `datafusion-proto`


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