Dandandan commented on a change in pull request #9084:
URL: https://github.com/apache/arrow/pull/9084#discussion_r551040443
##########
File path: rust/arrow/src/csv/reader.rs
##########
@@ -394,88 +393,116 @@ impl<R: Read> Iterator for Reader<R> {
}
}
-/// parses a slice of [csv_crate::StringRecord] into a
[array::record_batch::RecordBatch].
-fn parse(
+/// Tries to create an [array::Array] from a slice of
[csv_crate::StringRecord] by interpreting its
+/// values at column `column_index` to be of `data_type`.
+/// `line_number` is where the set of rows starts at, and is only used to
report the line number in case of errors.
+/// # Error
+/// This function errors iff:
+/// * _any_ entry from `rows` at `column_index` cannot be parsed into the
DataType.
+/// * The [array::datatypes::DataType] is not supported.
+pub fn build_array(
Review comment:
The downside is that this creates a dependency on `StringRecord` in the
public API, making it harder to remove it when we want?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]