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

json feature always requires base64 feature #2668

Merged
merged 1 commit into from
Sep 6, 2022

Conversation

eagletmt
Copy link
Contributor

@eagletmt eagletmt commented Sep 6, 2022

It should fix build failure when only json feature is enabled.

% cargo build --no-default-features --features json
error[E0433]: failed to resolve: use of undeclared crate or module `base64`
   --> parquet/src/record/api.rs:691:46
    |
691 |             Field::Bytes(b) => Value::String(base64::encode(b.data())),
    |                                              ^^^^^^ use of undeclared crate or module `base64`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `parquet` due to previous error

Which issue does this PR close?

Closes #2667 .

Rationale for this change

base64 is required to compile Field::to_json_value() function.
I considered alternative of replacing #[cfg(any(feature = "json", test)] with #[cfg(any(all(feature = "json", feature = "base64"), test)] , but I noticed that all json features require base64. So I chose to modify parquet/Cargo.toml instead of parquet/src/record/api.rs.

What changes are included in this PR?

I've added base64 to json feature.

Are there any user-facing changes?

No.

It should fix build failure when only json feature is enabled.

```
% cargo build --no-default-features --features json
error[E0433]: failed to resolve: use of undeclared crate or module `base64`
   --> parquet/src/record/api.rs:691:46
    |
691 |             Field::Bytes(b) => Value::String(base64::encode(b.data())),
    |                                              ^^^^^^ use of undeclared crate or module `base64`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `parquet` due to previous error
```
@github-actions github-actions bot added the parquet Changes to the parquet crate label Sep 6, 2022
@tustvold tustvold merged commit 613b66b into apache:master Sep 6, 2022
@tustvold
Copy link
Contributor

tustvold commented Sep 6, 2022

Thank you

@ursabot
Copy link

ursabot commented Sep 6, 2022

Benchmark runs are scheduled for baseline = a37c038 and contender = 613b66b. 613b66b is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ec2-t3-xlarge-us-east-2] ec2-t3-xlarge-us-east-2
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on test-mac-arm] test-mac-arm
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-i9-9960x] ursa-i9-9960x
[Skipped ⚠️ Benchmarking of arrow-rs-commits is not supported on ursa-thinkcentre-m75q] ursa-thinkcentre-m75q
Buildkite builds:
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@eagletmt eagletmt deleted the json-value-requires-base64 branch September 6, 2022 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
parquet Changes to the parquet crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parquet crate fails to build when only json feature is enabled
3 participants