You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/13 07:14:10 UTC
[GitHub] [arrow-rs] bjchambers commented on a diff in pull request #3365: Add csv-core based reader (#3338)
bjchambers commented on code in PR #3365:
URL: https://github.com/apache/arrow-rs/pull/3365#discussion_r1069008088
##########
arrow-csv/src/reader/mod.rs:
##########
@@ -916,31 +856,23 @@ fn build_primitive_array<T: ArrowPrimitiveType + Parser>(
// parses a specific column (col_idx) into an Arrow Array.
fn build_boolean_array(
line_number: usize,
- rows: &[StringRecord],
+ rows: &StringRecords<'_>,
col_idx: usize,
) -> Result<ArrayRef, ArrowError> {
rows.iter()
.enumerate()
.map(|(row_index, row)| {
- match row.get(col_idx) {
- Some(s) => {
- if s.is_empty() {
Review Comment:
This dropped the handling of null values for boolean arrays. Specifically, it removed the block below (which was previously present for primitives and booleans). The affect of this is that when parsing a CSV file containing a null value, it raises a parse error.
```
if s.is_empty() {
return Ok(None);
}
```
--
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.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org