MCPcopy Create free account
hub / github.com/apache/arrow-rs / build_timestamp_array

Function build_timestamp_array

arrow-csv/src/reader/mod.rs:1013–1028  ·  view source on GitHub ↗
(
    line_number: usize,
    rows: &StringRecords<'_>,
    col_idx: usize,
    timezone: Option<&str>,
    null_regex: &NullRegex,
)

Source from the content-addressed store, hash-verified

1011}
1012
1013fn build_timestamp_array<T: ArrowTimestampType>(
1014 line_number: usize,
1015 rows: &StringRecords<'_>,
1016 col_idx: usize,
1017 timezone: Option<&str>,
1018 null_regex: &NullRegex,
1019) -> Result<ArrayRef, ArrowError> {
1020 Ok(Arc::new(match timezone {
1021 Some(timezone) => {
1022 let tz: Tz = timezone.parse()?;
1023 build_timestamp_array_impl::<T, _>(line_number, rows, col_idx, &tz, null_regex)?
1024 .with_timezone(timezone)
1025 }
1026 None => build_timestamp_array_impl::<T, _>(line_number, rows, col_idx, &Utc, null_regex)?,
1027 }))
1028}
1029
1030fn build_timestamp_array_impl<T: ArrowTimestampType, Tz: TimeZone>(
1031 line_number: usize,

Callers

nothing calls this directly

Calls 2

parseMethod · 0.45
with_timezoneMethod · 0.45

Tested by

no test coverage detected