Skip to content

Fix Postgres decimal formatter clippy - #24975

Merged
neilconway merged 2 commits into
apache:mainfrom
Embucket:upstream-slt-decimal-clippy
Sep 7, 2026
Merged

Fix Postgres decimal formatter clippy#24975
neilconway merged 2 commits into
apache:mainfrom
Embucket:upstream-slt-decimal-clippy

Conversation

@osipovartem

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

The required cargo clippy --all-targets --all-features -- -D warnings command fails because the PostgreSQL result formatter takes a BigDecimal by value but only reads it.

What changes are included in this PR?

  • Accept &BigDecimal in decimal_to_str.
  • Borrow the parsed PostgreSQL decimal at the call site.
  • Add a direct formatting regression test under the postgres feature.

What is the testing strategy for this PR?

  • cargo test -p datafusion-sqllogictest --lib --features postgres engines::conversion
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check

Are there any user-facing changes?

No. The formatted PostgreSQL decimal output is unchanged.

@github-actionsgithub-actionsBot added the sqllogictest SQL Logic Tests (.slt) label Sep 6, 2026
@codecov-commenter

codecov-commenter commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.67%. Comparing base (262936e) to head (d12d695).

Additional details and impacted files
@@ Coverage Diff @@## main #24975 +/- ##
==========================================
- Coverage 81.67% 81.67% -0.01% 
==========================================
Files 1126 1126 Lines 414842 414842 Branches 414842 414842 ==========================================
- Hits 338841 338832 -9 - Misses 56070 56077 +7 - Partials 19931 19933 +2 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@osipovartem
osipovartemforce-pushed the upstream-slt-decimal-clippy branch from b7fb5cf to c25d58aCompareSeptember 6, 2026 16:39

@neilconwayneilconway left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@neilconway
neilconway added this pull request to the merge queueSep 7, 2026
Merged via the queue into apache:main with commit 1b6dc92Sep 7, 2026
38 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sqllogictestSQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Full workspace clippy fails in PostgreSQL decimal formatting

3 participants

@osipovartem@codecov-commenter@neilconway