Skip to content

Commit d3df44f

Browse files
committed
u
Signed-off-by: Joe Isaacs <[email protected]>
1 parent ab9d135 commit d3df44f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

vortex-array/src/arrays/arbitrary.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,14 @@ fn random_array_chunk(
9393
PType::F32 => random_primitive::<f32>(u, *n, chunk_len),
9494
PType::F64 => random_primitive::<f64>(u, *n, chunk_len),
9595
},
96-
DType::Decimal(decimal, n) => {
96+
d @ DType::Decimal(decimal, n) => {
9797
let elem_len = chunk_len.unwrap_or(u.int_in_range(0..=20)?);
9898
match_each_decimal_value_type!(
9999
DecimalType::smallest_decimal_value_type(decimal),
100100
|DVT| {
101-
let mut builder =
102-
DecimalBuilder::new::<DVT>(decimal.precision(), decimal.scale(), *n);
101+
let mut builder = DecimalBuilder::new::<DVT>(*decimal, *n);
103102
for _i in 0..elem_len {
104-
let random_decimal = random_scalar(u, &DType::Decimal(*decimal, *n))?;
103+
let random_decimal = random_scalar(u, d)?;
105104
builder.append_scalar(&random_decimal).vortex_expect(
106105
"was somehow unable to append a decimal to a decimal builder",
107106
);

0 commit comments

Comments
 (0)