- Notifications
You must be signed in to change notification settings - Fork 1.7k
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
#17023 introduced support for doing log on decimal 128 & 256 bit. 256 is handled by downcasting to 128 if value can fit in the range, otherwise raising an error.
Describe the solution you'd like
Look into supporting log on decimal 256 values that don't fit into decimal 128 bit.
Describe alternatives you've considered
No response
Additional context
Code reference:
datafusion/datafusion/functions/src/math/log.rs
Lines 129 to 138 in 572c204
/// Binary function to calculate an integer logarithm of Decimal128 `value` using `base` base | |
/// Returns error if base is invalid or if value is out of bounds of Decimal128 | |
fn log_decimal256(value: i256, scale: i8, base: f64) -> Result<f64, ArrowError> { | |
match value.to_i128() { | |
Some(value) => log_decimal128(value, scale, base), | |
None => Err(ArrowError::NotYetImplemented(format!( | |
"Log of Decimal256 larger than Decimal128 is not yet supported: {value}" | |
))), | |
} | |
} |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request