-
Notifications
You must be signed in to change notification settings - Fork 323
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
Data analysts should be able to reorder columns into name order using sort_columns functions #3250
Conversation
b8191c0
to
80e2020
Compare
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.
I left a bunch of comments, but they are applicable to more places. Please be sure that all TODO comments are always well described and linked to the right place.
distribution/lib/Standard/Base/0.2.32-SNAPSHOT/src/Data/Ordering/Natural_Order.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.2.32-SNAPSHOT/src/Data/Ordering/Natural_Order.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.2.32-SNAPSHOT/src/Data/Ordering/Natural_Order.enso
Outdated
Show resolved
Hide resolved
@@ -171,7 +172,7 @@ type Table | |||
table.remove_columns (By_Name.new ["bar", "foo"]) | |||
|
|||
## TODO [RW] default arguments do not work on atoms, once this is fixed, | |||
the above should be replaced with just `Matching.Exact`. | |||
the above should be replaced with just `By_Name`. |
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.
these TODOs do not have links to tickets. Please add them. Every TODO has to have link to a relevant ticket.
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.
The link is below: See: https://github.com/enso-org/enso/issues/1600
.
Or should we create a Pivotal ticket for this?
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.
The link is below: See: https://github.com/enso-org/enso/issues/1600
.
Or should we create a Pivotal ticket for this?
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.
The link is just below, as part of this comment: See: https://github.com/enso-org/enso/issues/1600
.
Or should we link to a Pivotal ticket instead? (I think one does not exist for this issue currently, so shall it be created?)
distribution/lib/Standard/Table/0.2.32-SNAPSHOT/src/Data/Sort_Method.enso
Outdated
Show resolved
Hide resolved
@@ -406,6 +407,32 @@ type Table | |||
new_columns = Table_Helpers.reorder_columns internal_columns=this.columns selector=columns position=position on_problems=on_problems warnings=warnings | |||
here.new new_columns | |||
|
|||
## Returns a new table with the columns sorted by name according to the | |||
specified sort method. By default, sorting will be according to | |||
case-sensitive ascending order based on code points. |
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.
If I remember correctly, in our design document we've been talking aobut grapheme clusters, not code points. Sorting by code points will work bad, especially for international cases.
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.
Fair. Well, what this option does is using the default _.compare_to
on strings.
IMO changing the way we compare Texts is out of scope of this change (which just adds a new function on Tables), so I'd suggest modifying the default comparison method as part of the work on improving the Text API.
In that case that comment would stay as-is for now and be updated accordingly once that happens. Does that work?
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.
I have changed the docs to say that the order is according to Text.compare_to
.
Will create a separate task to ensure that Text.compare_to
is according to grapheme clusters.
80e2020
to
c174fcd
Compare
distribution/lib/Standard/Base/0.0.0-dev/src/Data/Ordering/Natural_Order.enso
Show resolved
Hide resolved
|
f296c14
to
2dc6ef4
Compare
2dc6ef4
to
ed7affb
Compare
Pull Request Description
Closes https://www.pivotaltracker.com/story/show/181034280
Important Notes
Checklist
Please include the following checklist in your PR: