File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
arrow/src/compute/kernels Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ pub struct CastOptions {
6363}
6464
6565pub const DEFAULT_CAST_OPTIONS : CastOptions = CastOptions { safe : true } ;
66+ pub const CUBESQL_CAST_OPTIONS : CastOptions = CastOptions { safe : false } ;
6667
6768/// Return true if a value of type `from_type` can be cast into a
6869/// value of `to_type`. Note that such as cast may be lossy.
@@ -314,7 +315,7 @@ pub fn can_cast_types(from_type: &DataType, to_type: &DataType) -> bool {
314315/// * List to primitive
315316/// * Interval and duration
316317pub fn cast ( array : & ArrayRef , to_type : & DataType ) -> Result < ArrayRef > {
317- cast_with_options ( array, to_type, & DEFAULT_CAST_OPTIONS )
318+ cast_with_options ( array, to_type, & CUBESQL_CAST_OPTIONS )
318319}
319320
320321// cast the integer array to defined decimal data type array
You can’t perform that action at this time.
0 commit comments