himadripal commented on PR #6836: URL: https://github.com/apache/arrow-rs/pull/6836#issuecomment-2518886685
> > There is a regression in `test_cast_decimal128_to_decimal256_negative`. The new validation check is correctly throwing an error, but it looks like we also need to add this validation when creating decimal arrays since the current test is creating invalid arrays before the cast: > > ```rust > > let array = vec![Some(i128::MAX), Some(i128::MIN)]; > > let input_decimal_array = create_decimal_array(array, 10, 3).unwrap(); > > ``` > > > > > > > > > > > > > > > > > > > > > > > > I would expect this to fail, so we probably need to add the same validation there. > > On second thoughts, it seems it was an intentional design decision not to validate this on array creation. Instead, an `array.validate_decimal_precision` method can optionally be called on the array to validate it after creation, so we should probably just update the test as needed (@alamb @tustvold perhaps you could correct me if I am wrong about this). Changed the test to pass. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
