Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataFusion will not build with Rust 1.52.1 #695

Closed
alamb opened this issue Jul 7, 2021 · 0 comments · Fixed by #696
Closed

DataFusion will not build with Rust 1.52.1 #695

alamb opened this issue Jul 7, 2021 · 0 comments · Fixed by #696
Labels
bug Something isn't working

Comments

@alamb
Copy link
Contributor

alamb commented Jul 7, 2021

Describe the bug

When I build datafusion like this

cargo +1.52.1 test -p datafusion

I get the following error:

Compiling datafusion v4.0.0-SNAPSHOT (/Users/alamb/Software/arrow-datafusion/datafusion)
error[E0277]: `[(std::string::String, SQLMetric); 2]` is not an iterator
   --> datafusion/src/physical_plan/parquet.rs:516:14
    |
516 |             .flat_map(|p| {
    |              ^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
    = help: the trait `Iterator` is not implemented for `[(std::string::String, SQLMetric); 2]`
    = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
    = note: required because of the requirements on the impl of `IntoIterator` for `[(std::string::String, SQLMetric); 2]`

error[E0599]: the method `chain` exists for struct `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>`, but its trait bounds were not satisfied
   --> datafusion/src/physical_plan/parquet.rs:531:14
    |
531 |             .chain(std::iter::once((
    |              ^^^^^ method cannot be called on `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>` due to unsatisfied trait bounds
    | 
   ::: /Users/alamb/.rustup/toolchains/1.52.1-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:12:1
    |
12  | pub struct FlatMap<I, U: IntoIterator, F> {
    | -----------------------------------------
    | |
    | doesn't satisfy `_: Iterator`
    | doesn't satisfy `_: futures::StreamExt`
    | doesn't satisfy `_: futures::Stream`
    |
    = note: the following trait bounds were not satisfied:
            `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::Stream`
            which is required by `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::StreamExt`
            `[(std::string::String, SQLMetric); 2]: IntoIterator`
            which is required by `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: Iterator`
            `&std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::Stream`
            which is required by `&std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::StreamExt`
            `&mut std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::Stream`
            which is required by `&mut std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::StreamExt`
            `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: Iterator`
            which is required by `&mut std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: Iterator`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `datafusion`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error[E0277]: `[(std::string::String, SQLMetric); 2]` is not an iterator
   --> datafusion/src/physical_plan/parquet.rs:516:14
    |
516 |             .flat_map(|p| {
    |              ^^^^^^^^ borrow the array with `&` or call `.iter()` on it to iterate over it
    |
    = help: the trait `Iterator` is not implemented for `[(std::string::String, SQLMetric); 2]`
    = note: arrays are not iterators, but slices like the following are: `&[1, 2, 3]`
    = note: required because of the requirements on the impl of `IntoIterator` for `[(std::string::String, SQLMetric); 2]`

error[E0599]: the method `chain` exists for struct `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>`, but its trait bounds were not satisfied
   --> datafusion/src/physical_plan/parquet.rs:531:14
    |
531 |             .chain(std::iter::once((
    |              ^^^^^ method cannot be called on `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>` due to unsatisfied trait bounds
    | 
   ::: /Users/alamb/.rustup/toolchains/1.52.1-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/iter/adapters/flatten.rs:12:1
    |
12  | pub struct FlatMap<I, U: IntoIterator, F> {
    | -----------------------------------------
    | |
    | doesn't satisfy `_: Iterator`
    | doesn't satisfy `_: futures::StreamExt`
    | doesn't satisfy `_: futures::Stream`
    |
    = note: the following trait bounds were not satisfied:
            `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::Stream`
            which is required by `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::StreamExt`
            `[(std::string::String, SQLMetric); 2]: IntoIterator`
            which is required by `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: Iterator`
            `&std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::Stream`
            which is required by `&std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::StreamExt`
            `&mut std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::Stream`
            which is required by `&mut std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: futures::StreamExt`
            `std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: Iterator`
            which is required by `&mut std::iter::FlatMap<std::slice::Iter<'_, ParquetPartition>, [(std::string::String, SQLMetric); 2], [closure@datafusion/src/physical_plan/parquet.rs:516:23: 530:14]>: Iterator`

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: build failed

Compilation exited abnormally with code 101 at Wed Jul  7 11:00:32
@alamb alamb added the bug Something isn't working label Jul 7, 2021
@alamb alamb closed this as completed in #696 Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant