pub fn parse_filename_timestamps(filename: &str) -> Option<(u64, u64)>
Expand description
Parses timestamps from a Parquet filename.
Extracts the start and end timestamps from filenames that follow the ISO 8601 format:
“iso_timestamp_1_iso_timestamp_2.parquet
” (e.g., “2021-01-01T00-00-00-000000000Z_2021-01-02T00-00-00-000000000Z.parquet”)
§Parameters
filename
: The filename to parse (can be a full path).
§Returns
Returns Some((start_ts, end_ts))
if the filename matches the expected format,
None
otherwise.
§Examples
assert!(parse_filename_timestamps("2021-01-01T00-00-00-000000000Z_2021-01-02T00-00-00-000000000Z.parquet").is_some());
assert_eq!(parse_filename_timestamps("invalid.parquet"), None);