Skip to content

Used constant with mapping instead of write! to display scalar value bytes #20719

Open
buraksenn wants to merge 1 commit intoapache:mainfrom
buraksenn:convert-last-use-of-write-to-hex-mapping
Open

Used constant with mapping instead of write! to display scalar value bytes #20719
buraksenn wants to merge 1 commit intoapache:mainfrom
buraksenn:convert-last-use-of-write-to-hex-mapping

Conversation

@buraksenn
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

This was the latest usage as far as I can see so I've changed it. I think this is not on the hot path so if you want we can close the PR and issue with it.

What changes are included in this PR?

Instead of using write! format string write hex with using constant char mapping

Are these changes tested?

Runned debug display tests:

running 1 test
test scalar::tests::test_binary_display ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 364 filtered out; finished in 0.00s

Are there any user-facing changes?

No

@github-actions github-actions bot added the common Related to common crate label Mar 5, 2026
Copy link
Contributor

@alamb alamb 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 -- thank you @buraksenn

I confirmed that this appears to be the last usage
https://github.com/search?q=repo%3Aapache%2Fdatafusion%20%7Bb%3A02X%7D&type=code

FYI @andygrove as you filed the original request

Copy link
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

Thanks @buraksenn!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review uses of "{b:02x}" to hex-encode bytes

3 participants