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

Fix compilation of datafusion-cli on 32bit targets #10594

Merged
merged 1 commit into from
May 21, 2024

Conversation

nathaniel-daniel
Copy link
Contributor

Which issue does this PR close?

Closes #10552.

Rationale for this change

This PR fixes compilation of the datafusion-cli crate on 32bit targets.

What changes are included in this PR?

A constant assumed that a usize was at least 64 bits wide. I changed the constant type to be a u64, before translating it into a usize later on, throwing an error if it overflows.

Are these changes tested?

These changes are not tested. I assumed adding CI for 32bit targets was too invasive for this PR.

Are there any user-facing changes?

There should be no user-facing changes or breaking changes.

Copy link
Member

@jonahgao jonahgao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

cargo build --target=i686-unknown-linux-gnu can succeed now.
And for larger sizes, its execution meets expectations.

$ ./target/i686-unknown-linux-gnu/debug/datafusion-cli --memory-limit 5g
error: Invalid value "5g" for '--memory-limit <MEMORY_LIMIT>': Memory pool size '5g' is too large

@alamb
Copy link
Contributor

alamb commented May 21, 2024

Thank you @nathaniel-daniel and @jonahgao

@alamb alamb merged commit 6a75ba6 into apache:main May 21, 2024
23 checks passed
@nathaniel-daniel nathaniel-daniel deleted the fix-issue-10552 branch May 22, 2024 00:05
findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: this arithmetic operation will overflow (on i386)
3 participants