Skip to content

Compilation errors when disabling default features in datafusion-common #7624

@jonmmease

Description

@jonmmease

Describe the bug

When depending on datafusion-common with default-features = false, there are compilation errors related to parquet functionality.

To Reproduce

In the datafusion-expr crate, add default-features = false to the datafusion-common dependency. Then try to build the datafusion-expr crate.

There are compilation errors such as:

error[E0433]: failed to resolve: use of undeclared crate or module `parquet`
  --> datafusion/common/src/file_options/parse_utils.rs:20:5
   |
20 | use parquet::{
   |     ^^^^^^^ use of undeclared crate or module `parquet`

error[E0433]: failed to resolve: use of undeclared crate or module `parquet`
  --> datafusion/common/src/file_options/parquet_writer.rs:20:5
   |
20 | use parquet::file::properties::{WriterProperties, WriterPropertiesBuilder};
   |     ^^^^^^^ use of undeclared crate or module `parquet`

error[E0433]: failed to resolve: use of undeclared crate or module `parquet`
  --> datafusion/common/src/file_options/parse_utils.rs:43:13
   |
43 | ) -> Result<parquet::basic::Encoding> {
   |             ^^^^^^^ use of undeclared crate or module `parquet`

error[E0433]: failed to resolve: use of undeclared crate or module `parquet`
  --> datafusion/common/src/file_options/parse_utils.rs:46:23
   |
46 |         "plain" => Ok(parquet::basic::Encoding::PLAIN),
   |                       ^^^^^^^ use of undeclared crate or module `parquet`
   |
...

Expected behavior

It would be possible to compile datafusion-common with the default parquet feature disabled.

Additional context

In VegaFusion I compile datafusion-common into WASM, and the parquet crate is not (easily?) compatible with WASM due to some non-rust compression dependencies.

I'll have a PR with suggested fix up shortly

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions