Repository navigation
Fix decimal scalar dyn kernels - #5179
Conversation
|
|
||
| pub(crate) fn add_decimal_dyn_scalar(left: &dyn Array, right: i128) -> Result<ArrayRef> { | ||
| let left_decimal = left.as_any().downcast_ref::<Decimal128Array>().unwrap(); | ||
| let (precision, scale) = get_precision_scale(left)?; |
There was a problem hiding this comment.
In last PR, forgot to update this and there.
|
CI seems broken: |
9c1520c to
72367ed
Compare
|
Proposed CI fix at #5182. |
alamb
left a comment
There was a problem hiding this comment.
The changes to the Decimal logic makes sense to me (other than the changes to github config -- I think you can remove those prior to merge)
| Operator::Plus, | ||
| ScalarValue::Dictionary( | ||
| Box::new(DataType::Int8), | ||
| Box::new(ScalarValue::Decimal128(Some(1), 10, 0)), |
There was a problem hiding this comment.
without this PR's code, is the actual type of the output array whatever the default precision of Decimal128 is (rather than 10, 0)?
There was a problem hiding this comment.
No, original code still modifies precision/scale for output array, but it just worked for primitive array not dictionary array.
This reverts commit 72367ed.
|
Benchmark runs are scheduled for baseline = a213d62 and contender = 4233752. 4233752 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Follow of #5151.
Rationale for this change
For
add_decimal_dyn_scalarandsubtract_decimal_dyn_scalar, it should callget_precision_scaleanddecimal_array_with_precision_scalelikemultiply_decimal_dyn_scalaranddivide_decimal_dyn_scalaras the input/output could be DictionaryArray.What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?