Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow using custom datetime format for inference and parsing csv file (…
…#1112) * allow using custom datetime format for inference and parsing csv file The patch extends the current implementation to allow passing a custom datetime_re and datetime_format to the ReaderBuilder. datetime_re is used infer schema of the csv and then datetime_format is used to parse the actual string to a Date64. ofcourse passing non-compatible datetime_re and datetime_format values is going to fail the parsing or inference, however it is an expected but hard-to-detect failure. * Incorporate some clippy recommendations for limit count of call args The patch adds a new struct to collect all these options together and then passes the struct around. Ideally the struct could be embedded into the reader but that can be done as separate exercise. * Detect presence of timezone in format while parsing csv for date64 The patch decides on using NaiveDateTime or DateTime from chrono lib based on presence of timezone components chrono expects timezone to be presetn if DateTime is used, errors otherwise. Whereas NaiveDateTime ignores timezone even if explicitly provided.
- Loading branch information