Skip to content

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

Merged
alamb merged 1 commit intoapache:mainfrom
nathaniel-daniel:fix-issue-10552
May 21, 2024
Merged

Fix compilation of datafusion-cli on 32bit targets#10594
alamb merged 1 commit intoapache:mainfrom
nathaniel-daniel:fix-issue-10552

Conversation

@nathaniel-daniel
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

alamb commented May 21, 2024

Thank you @nathaniel-daniel and @jonahgao

@alamb alamb merged commit 6a75ba6 into apache:main May 21, 2024
@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