You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/02/03 19:24:31 UTC
[GitHub] [arrow-rs] tustvold commented on a diff in pull request #3657: Include line and field number in CSV UTF-8 error (#3656)
tustvold commented on code in PR #3657:
URL: https://github.com/apache/arrow-rs/pull/3657#discussion_r1096190618
##########
arrow-csv/src/reader/mod.rs:
##########
@@ -2231,4 +2231,37 @@ mod tests {
}
}
}
+
+ fn err_test(csv: &[u8], expected: &str) {
+ let schema = Arc::new(Schema::new(vec![
+ Field::new("text1", DataType::Utf8, false),
+ Field::new("text2", DataType::Utf8, false),
+ ]));
+ let buffer = std::io::BufReader::with_capacity(2, Cursor::new(csv));
+ let b = ReaderBuilder::new()
+ .with_schema(schema)
Review Comment:
We need to provide the schema here, as otherwise the schema inference code produces the error
--
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