Skip to content

Commit e7b4a80

Browse files
committed
fix(cubesql): fix unhandled timestamp unwrapping in df/transform_response
1 parent 8e7c5c7 commit e7b4a80

File tree

1 file changed

+4
-2
lines changed
  • rust/cubesql/cubesql/src/compile/engine/df

1 file changed

+4
-2
lines changed

rust/cubesql/cubesql/src/compile/engine/df/scan.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,10 +1135,12 @@ 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+
builder.append_null()?;
11421144
}
11431145
},
11441146
},

0 commit comments

Comments
 (0)