-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String to decimal conversion written using E/scientific notation #5611
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this, could we perhaps get some tests of:
- Overflow behaviour
- Malformed numbers containing multiple
e
or multiple+
/-
Fixed error e without fractional part (e.g. 0e-8, 1e7)
@tustvold thanks, added tests |
added additional tests for e/scientific notation
Fixed a few bugs, didn't find any more bugs, if you have any comments, please let me know |
Sorry I am a bit swamped at the moment, I will review this first thing next week if nobody gets there first |
mut digits: u16, | ||
mut fractionals: i16, | ||
mut result: T::Native, | ||
index: usize, | ||
precision: u16, | ||
scale: i16, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this state could be encapsulated into a struct or similar, possibly something for a follow up PR
So this does represent a non-trivial performance regression ~8%, but I suspect this is likely unavoidable and the regression isn't hugely concerning to me.
|
@Nekit2217 @tustvold thanks both!! |
Which issue does this PR close?
Closes #5549.
Rationale for this change
There are errors when creating checkpoints in DeltaLake related to converting strings in E notation to a decimal field
What changes are included in this PR?
Added string to decimal conversion written using E/scientific notation, no APIs were affected
Are there any user-facing changes?
No