Skip to content

Fix Postgres decimal formatter clippy - #24975

Open
osipovartem wants to merge 1 commit into
apache:mainfrom
Embucket:upstream-slt-decimal-clippy
Open

Fix Postgres decimal formatter clippy#24975
osipovartem wants to merge 1 commit 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-actions github-actions Bot added the sqllogictest SQL Logic Tests (.slt) label Sep 6, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.67%. Comparing base (722cbf2) to head (b7fb5cf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24975      +/-   ##
==========================================
- Coverage   81.67%   81.67%   -0.01%     
==========================================
  Files        1126     1126              
  Lines      414533   414533              
  Branches   414533   414533              
==========================================
- Hits       338562   338560       -2     
+ Misses      56058    56057       -1     
- Partials    19913    19916       +3     

☔ 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.

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

Labels

sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Full workspace clippy fails in PostgreSQL decimal formatting

2 participants