houqp commented on a change in pull request #7009:
URL: https://github.com/apache/arrow/pull/7009#discussion_r414007919



##########
File path: rust/parquet/src/record/api.rs
##########
@@ -50,6 +50,33 @@ impl Row {
     pub fn len(&self) -> usize {
         self.fields.len()
     }
+
+    pub fn get_column_iter(&self) -> RowColumnIter {
+        RowColumnIter {
+            fields: &self.fields,
+            curr: 0,
+            count: self.fields.len(),
+        }
+    }
+}
+
+pub struct RowColumnIter<'a> {
+    fields: &'a Vec<(String, Field)>,
+    curr: usize,
+    count: usize,
+}
+
+impl<'a> Iterator for RowColumnIter<'a> {
+    type Item = (usize, &'a String);

Review comment:
       Thanks for the suggestions, I have changed it to return column name and 
field as a tuple.




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


Reply via email to