-
Notifications
You must be signed in to change notification settings - Fork 892
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimise decimal casting for infallible conversions (#7021)
* Implement fast path for infallible case. * Add benchmark for infallible casting to smaller scale. * Format benchmark. * Improve test cases. * Simplify implementation to reduce code duplication. * Add error test case. * Add extensive test suite. * Remove specialization. * Add example as comment. * Reorder fields. * Check preconditions on precision and scale. * Test decimal cast between multiple types. * Check against error message template. * Move validation into infallible branch. * Use generic function instead of macro to run tests. * Add clarifying comment about unwrapping. * Fix typo. * Add test case for input/output scale = 0. * Fix clippy.
- Loading branch information
Showing
3 changed files
with
408 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.