-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sorting with multiple SortByClauses #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, it could use additional tests for different datatypes though
Added more tests and all datatypes are now utilized, including the AUTOMATIC type in SortByClause. Forgot to mention earlier, all tests in PTH-10 are passing when using this branch locally! There is just a small need for fixes in PTH-10 because I refactored BatchCollect and SortByClause to not accept null anymore and there was a few calls that passed null to constructors in PTH-10. Otherwise all good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests should not throw anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the ip address ranges
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Related to PTH-10 issue #256.
The SortOperation takes a List of SortByClauses as parameter to sort with. However, the List was used in a for loop in a way that it always overrode the previous sorting that had happened, ultimately only applying sorting to the dataset with the last SortByClause of the List. Not likely that this was intentional.
I changed it so that it now executes just one
orderBy()
call for all of the SortByClauses.So it now sorts first with the column that is first on the list, then inside that sorting it sorts again with the second column and so on. This means it preserves the sorting of the column that was in the list before.