alamb commented on code in PR #2711:
URL: https://github.com/apache/arrow-rs/pull/2711#discussion_r970743210


##########
arrow-schema/src/schema.rs:
##########
@@ -205,13 +211,13 @@ impl Schema {
     }
 
     /// Find the index of the column with the given name.
-    pub fn index_of(&self, name: &str) -> Result<usize> {
+    pub fn index_of(&self, name: &str) -> Result<usize, ArrowSchemaError> {
         (0..self.fields.len())
             .find(|idx| self.fields[*idx].name() == name)
             .ok_or_else(|| {
                 let valid_fields: Vec<String> =
                     self.fields.iter().map(|f| f.name().clone()).collect();
-                ArrowError::InvalidArgumentError(format!(
+                ArrowSchemaError::Field(format!(

Review Comment:
   We are continuing the conversation here: 
https://github.com/apache/arrow-rs/issues/2725



-- 
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