Skip to content

Conversation

@eutampieri
Copy link
Contributor

I've added .iter() to the Row struct.

Copy link
Member

@IvanUkhov IvanUkhov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. In general, it might be helpful to have this possibility. However, I think it will be confusing if the iterator does not return the columns in the original order. I would propose to ensure that happens.

@eutampieri
Copy link
Contributor Author

Yes, I was trying to do what you said, and I originally thought that the Vec contains the columns in the right order, but it seems to be random.
Let me know if you have any ideas on how to preserve (or pass on) the columns order.
Also, thanks for reviewing this PR so quickly!

@IvanUkhov
Copy link
Member

One could wrap column_names into Rc and then put it into Row next to column_mapping. One could then iterate over column_names instead of column_mapping.

@eutampieri eutampieri requested a review from IvanUkhov February 16, 2025 10:18
@eutampieri eutampieri requested a review from IvanUkhov February 16, 2025 10:39
@IvanUkhov IvanUkhov merged commit 3bd2f40 into stainless-steel:main Feb 16, 2025
5 checks passed
@IvanUkhov
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants