Closed jeffbrennan closed 8 months ago
@SemyonSinchenko - can you please take a look when you have a sec?
Thanks for the feedback! I can work on the refactor this Sunday.
@SemyonSinchenko, I updated the function based on your comments. Let me know if it is easier to read and if you have any other questions
@jeffbrennan Nice work! Thanks a lot for such a contribution! May you please carefully resolve all the merge conflicts by merging main branch to your fork? @MrPowers I suggest to merge it.
@SemyonSinchenko @MrPowers, I reviewed the merge conflicts and the changes look good to me. Could someone do a quick sanity check before I merge into main?
addresses #109
Summary I modified the existing
sort_columns()
function to accommodate optional nested sorting based on a new boolean flagsort_nested
and an initial check for nested datatypes in the top-level columns.sort_nested
defaults toFalse
so (hopefully) no users of the previoussort_columns()
will be affected.I put together 10 tests to try and handle different types of nested cases. If anyone wants to add some more tests I would be happy to update the function logic to deal with any failures. This includes testing different data values and ensuring they enter and exit the function unchanged aside from their relative position.
Remaining issues to work through
MapTypes
I don't think this is ideal and might have some performance impacts on larger datasets.
Happy to answer any questions! This was a fun one to figure out.