File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
rust/cubesql/cubesql/src/compile/engine/df Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1135,10 +1135,16 @@ pub fn transform_response<V: ValueObject>(
11351135 ) )
11361136 } ) ?;
11371137 // TODO switch parsing to microseconds
1138- if timestamp. timestamp_millis( ) > ( ( ( 1 as i64 ) << 62 ) / 1_000_000 ) {
1138+ if timestamp. timestamp_millis( ) > ( ( ( 1i64 ) << 62 ) / 1_000_000 ) {
11391139 builder. append_null( ) ?;
1140+ } else if let Some ( nanos) = timestamp. timestamp_nanos_opt( ) {
1141+ builder. append_value( nanos) ?;
11401142 } else {
1141- builder. append_value( timestamp. timestamp_nanos_opt( ) . unwrap( ) ) ?;
1143+ log:: error!(
1144+ "Unable to cast timestamp value to nanoseconds: {}" ,
1145+ timestamp. to_string( )
1146+ ) ;
1147+ builder. append_null( ) ?;
11421148 }
11431149 } ,
11441150 } ,
You can’t perform that action at this time.
0 commit comments