Skip to content

Commit 40f6cd5

Browse files
committed
fix Decimal
1 parent d6a8c0d commit 40f6cd5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rust/cubesql/cubesql/src/sql/dataframe.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ pub fn arrow_to_column_type(arrow_type: DataType) -> Result<ColumnType, CubeErro
417417
| DataType::Int32 => Ok(ColumnType::Int32),
418418
DataType::UInt32
419419
| DataType::Int64 => Ok(ColumnType::Int64),
420-
DataType::UInt64 => Ok(ColumnType::Decimal(128, 0)),
420+
DataType::UInt64 => Ok(ColumnType::Decimal(39, 0)),
421421
DataType::Null => Ok(ColumnType::String),
422422
x => Err(CubeError::internal(format!("unsupported type {:?}", x))),
423423
}
@@ -843,7 +843,7 @@ mod tests {
843843
(DataType::Int32, ColumnType::Int32),
844844
(DataType::UInt32, ColumnType::Int64),
845845
(DataType::Int64, ColumnType::Int64),
846-
(DataType::UInt64, ColumnType::Decimal(128, 0)),
846+
(DataType::UInt64, ColumnType::Decimal(39, 0)),
847847
(DataType::Null, ColumnType::String),
848848
];
849849

@@ -1006,7 +1006,7 @@ mod tests {
10061006
create_record_batch(
10071007
DataType::UInt64,
10081008
UInt64Array::from(data64.clone()),
1009-
ColumnType::Decimal(128, 0),
1009+
ColumnType::Decimal(39, 0),
10101010
data64
10111011
.into_iter()
10121012
.map(|e| TableValue::Decimal128(Decimal128Value::new(e as i128, 0)))

0 commit comments

Comments
 (0)