Skip to content

Commit 6f77407

Browse files
committed
chore(cubestore): Upgrade DF: Fix panics involving TableValue::Decimal96
1 parent 445160d commit 6f77407

File tree

1 file changed

+9
-1
lines changed
  • rust/cubestore/cubestore/src/table

1 file changed

+9
-1
lines changed

rust/cubestore/cubestore/src/table/data.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ macro_rules! match_column_type {
154154
$matcher!(Decimal, Decimal128Builder, Decimal, scale, precision)
155155
}
156156
ColumnType::Decimal96 { scale, precision } => {
157-
$matcher!(Decimal, Decimal128Builder, Decimal, scale, precision)
157+
$matcher!(Decimal96, Decimal128Builder, Decimal96, scale, precision)
158158
}
159159
ColumnType::Float => $matcher!(Float, Float64Builder, Float),
160160
}
@@ -171,6 +171,14 @@ pub fn create_array_builder(t: &ColumnType) -> Box<dyn ArrayBuilder> {
171171
),
172172
))
173173
};
174+
($type: tt, Decimal128Builder, Decimal96, $scale: expr, $precision: expr) => {
175+
Box::new(Decimal128Builder::new().with_data_type(
176+
datafusion::arrow::datatypes::DataType::Decimal128(
177+
*$precision as u8,
178+
*$scale as i8,
179+
),
180+
))
181+
};
174182
($type: tt, Decimal128Builder, Int96) => {
175183
Box::new(
176184
Decimal128Builder::new()

0 commit comments

Comments
 (0)