Skip to content

Commit 7b6da81

Browse files
committed
Adapt CUDA decimal tests to the storage bound
The GPU filter test stores its i256 case at a precision that admits i256, and the Arrow export test for narrowing i256 storage below its precision is removed since such storage can no longer be constructed. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk> Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015zQPnFWRi7CWXHpgBE8CiF
1 parent a7b2e70 commit 7b6da81

2 files changed

Lines changed: 1 addition & 16 deletions

File tree

‎vortex-cuda/src/arrow/canonical.rs‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2254,21 +2254,6 @@ mod tests {
22542254
.await
22552255
}
22562256

2257-
#[crate::test]
2258-
async fn test_export_decimal_narrowing_errors() -> VortexResult<()> {
2259-
let mut ctx = CudaSession::create_execution_ctx(&crate::cuda_session())
2260-
.vortex_expect("failed to create execution context");
2261-
let array = DecimalArray::from_iter([i256::from_parts(0, 1)], DecimalDType::new(38, 0))
2262-
.into_array();
2263-
2264-
let err = array
2265-
.export_device_array_with_schema(&mut ctx)
2266-
.await
2267-
.unwrap_err();
2268-
assert!(err.to_string().contains("narrowing would require"));
2269-
Ok(())
2270-
}
2271-
22722257
#[rstest]
22732258
#[case::i64(
22742259
DecimalArray::from_iter([i64::MIN, -1i64, 1, i64::MAX], DecimalDType::new(39, 0)).into_array(),

‎vortex-cuda/src/kernel/filter/decimal.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ mod tests {
8181
Mask::from_iter([false, true, false, true, false])
8282
)]
8383
#[case::i256_values(
84-
DecimalArray::from_iter([i256::from_i128(1), i256::from_i128(2), i256::from_i128(3), i256::from_i128(4), i256::from_i128(5)], DecimalDType::new(19, 5)),
84+
DecimalArray::from_iter([i256::from_i128(1), i256::from_i128(2), i256::from_i128(3), i256::from_i128(4), i256::from_i128(5)], DecimalDType::new(39, 5)),
8585
Mask::from_iter([false, true, false, true, false])
8686
)]
8787
#[crate::test]

0 commit comments

Comments
 (0)