Jefffrey commented on code in PR #10611:
URL: https://github.com/apache/arrow-rs/pull/10611#discussion_r3753786576


##########
arrow-csv/src/reader/mod.rs:
##########
@@ -520,6 +520,18 @@ where
 }
 
 impl<R> BufReader<R> {
+    fn projected_schema(&self) -> SchemaRef {
+        match &self.decoder.projection {
+            Some(projection) => Arc::new(
+                self.decoder
+                    .schema
+                    .project(projection)
+                    .expect("invalid CSV projection"),

Review Comment:
   do we verify at any point earlier to this that the projection is valid? or 
we always would have panicked when accessing out of bounds indices?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to