pub fn time_to_scalar_value( unit: TimeUnit, val: Option<i64>, ) -> Result<ScalarValue>
Cast the 64-bit elapsed time into the arrow ScalarValue by time unit.