bug: Fix string decimal type throw right exception#3248
bug: Fix string decimal type throw right exception#3248andygrove merged 6 commits intoapache:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3248 +/- ##
============================================
+ Coverage 56.12% 60.13% +4.00%
- Complexity 976 1468 +492
============================================
Files 119 175 +56
Lines 11743 16085 +4342
Branches 2251 2665 +414
============================================
+ Hits 6591 9672 +3081
- Misses 4012 5066 +1054
- Partials 1140 1347 +207 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Root cause for test failures :
|
de1618a to
a9b9ccd
Compare
| trimmed, | ||
| input_str, | ||
| "STRING", | ||
| &format!("DECIMAL({},{})", precision, scale), |
There was a problem hiding this comment.
do we need to allocate this string here with the format!? It looks like this string is only used when an error occurs?
Can you share benchmarks showing before/after these changes?
There was a problem hiding this comment.
We don't currently hve string to decimal cast benchmarks at the moment. Let me create the benchmarks (based on string to int casting inputs) and rerun the benchmarks before and after string allocation fix
There was a problem hiding this comment.
Thank you . I was able to fix the unwanted allocation and improved performance by 2x
|
Thank you for the suggestion @andygrove . These are the benchmarks before and after removing string allocations even for happy paths |
andygrove
left a comment
There was a problem hiding this comment.
LGTM, pending CI. Thanks @coderfender!
|
Thank you for the approval @andygrove. Please merge whenever you get a chance |
Which issue does this PR close?
Closes #.
Rationale for this change
What changes are included in this PR?
How are these changes tested?