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

Resolve Issues with prettytable-rs dependency #69

Closed
alamb opened this issue Apr 26, 2021 · 0 comments · Fixed by #656
Closed

Resolve Issues with prettytable-rs dependency #69

alamb opened this issue Apr 26, 2021 · 0 comments · Fixed by #656
Labels
arrow Changes to the arrow crate

Comments

@alamb
Copy link
Contributor

alamb commented Apr 26, 2021

Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-8637

{{prettytable-rs}} is a dependency of Arrow for creating a string for displaying record batches in a tabular form (see [pretty util|https://github.com/apache/arrow/blob/c546eef41e6ab20c4ca29a2d836987959843896f/rust/arrow/src/util/pretty.rs#L24-L25]) The crate, however, has some issues:

 

1.) {{prettytable-rs}} has a dependency on the {{term}} crate. The {{term}} crate is under minimal maintenance, and it is advised to switch to another crate. This will probably pop up in an [informational security advisory|https://rustsec.org/advisories/RUSTSEC-2018-0015] if it's decided one day to audit the crates.

2.) The crate also has a dependency on {{encode-unicode}}. While not problematic in its own right, this crate implements some traits which can bring about confusing type inference issues. For example, after adding the {{prettytable-rs}} dependency in arrow, the following error occurred what attempting to compile the parquet crate:

 

{{let seed_vec: Vec =}}

{{    Standard.sample_iter(&mut rng).take(seed_len).collect();}}

 

{{error[E0282]: type annotations needed}}
{{   --> parquet/src/encodings/rle.rs:833:26}}
{{    |}}
{{833 | Standard.sample_iter(&mut rng).take(seed_len).collect();}}
{{    | ^^^^^^^^^^^ cannot infer type for T}}

 

Any user of the arrow crate would see a similar style of error.

 

There are a few possible ways to resolve this:

 

1.) Hopefully hear from the crate maintainer. There is a [PR open|https://github.com/phsym/prettytable-rs/pull/125] for the encode-unicode issue.

2.) Find a different table-generating crate with less issues.

3.) Fork and fix prettytable-rs.

4.) ???

 
 

@alamb alamb added the arrow Changes to the arrow crate label Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant