Repository navigation
Align fractional float casts to signed integers in the main API - #4037
Lingikaushikreddy wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (10)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe main namespace now truncates floating-point values toward zero before signed-integer casts in the updated backend paths. Stable namespaces retain backend-native behavior. Documentation and tests cover the cast behavior across backends. ChangesFloat-to-integer casts
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Suggested reviewers: Fixed issue severity: <fixed_issue_severity>Medium</fixed_issue_severity> Merge Risk: ⚪ Minimal · up to The change makes float-to-signed-integer casts truncate toward zero in the main namespace, documents the difference from the stable namespaces, and adds cross-backend tests. No merge-blocking risk was identified from the supplied evidence. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change is contained and version-gated, but affects public cast results across several execution paths. Stable APIs retain existing behavior, and no security-boundary regression was found in the reviewed paths. Effects on downstream applications remain outside the available evidence. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 9 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Align fractional floating-point casts to signed integers across backends in the main API by truncating toward zero. For example,
1.9becomes1and-1.9becomes-1. Apply truncation only to floating-point source expressions, preserve safe overflow checks in Arrow, and retain the native behavior of the stable v1 and v2 APIs. Regression coverage includes series, full-frame casts, lazy expressions, grouped aggregates, and windows.What type of PR is this?
Related issues
Closes #4019.
Validation
_duckdb/utils.pyandtests/version_test.py. Changed measured files had 100% coverage.AI assistance
Tool/model: OpenAI Codex, GPT-6 family; the exact serving variant is not exposed in this session. AI assistance was used for investigation, implementation, regression tests, documentation, automated validation, code review, and this description. Human line-by-line review remains pending. Submitted through the user's browser at their explicit direction.
Checklist
Summary by CodeRabbit
Local test evidence
The exact command in the first-contribution checklist passed with 16,549 passed, 340 skipped, and 980 expected failures (exit status 0, project default local coverage threshold 80%). This screenshot displays the actual saved local output; the separate 100% coverage gate remains unmet at 99.99%.