Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions rust/cubesql/cubesql/src/compile/engine/df/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1135,10 +1135,16 @@
))
})?;
// TODO switch parsing to microseconds
if timestamp.timestamp_millis() > (((1 as i64) << 62) / 1_000_000) {
if timestamp.timestamp_millis() > (((1i64) << 62) / 1_000_000) {
builder.append_null()?;
} else if let Some(nanos) = timestamp.timestamp_nanos_opt() {
builder.append_value(nanos)?;
} else {
builder.append_value(timestamp.timestamp_nanos_opt().unwrap())?;
log::error!(
"Unable to cast timestamp value to nanoseconds: {}",
timestamp.to_string()

Check warning on line 1145 in rust/cubesql/cubesql/src/compile/engine/df/scan.rs

View check run for this annotation

Codecov / codecov/patch

rust/cubesql/cubesql/src/compile/engine/df/scan.rs#L1143-L1145

Added lines #L1143 - L1145 were not covered by tests
);
builder.append_null()?;

Check warning on line 1147 in rust/cubesql/cubesql/src/compile/engine/df/scan.rs

View check run for this annotation

Codecov / codecov/patch

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

Added line #L1147 was not covered by tests
}
},
},
Expand Down
Loading