Skip to content
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

Adjusting First and Last order_by to use Sort_Column_Selector #3517

Merged
merged 16 commits into from
Jun 10, 2022

Conversation

jdunkerley
Copy link
Member

@jdunkerley jdunkerley commented Jun 8, 2022

Pull Request Description

Important Notes

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide dist and ./run ide watch.

@jdunkerley jdunkerley force-pushed the wip/jd/first-last-sort-column-selector-182413922 branch from 233f128 to 1e6f45b Compare June 8, 2022 13:44
@jdunkerley jdunkerley marked this pull request as ready for review June 9, 2022 08:18
Copy link
Member

@radeusgd radeusgd left a comment

Choose a reason for hiding this comment

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

Generally looks good, I'm just worried about violating the type signature of generate_expression.

At least we need to update the type signature to reflect what it really can return, as otherwise it may be misleading (which is worse than having no signature at all).

However, ideally, I'd consider if we can brainstorm some solution that will be safer for future changes; ideally making the signature of this function more uniform.

@jdunkerley jdunkerley requested a review from radeusgd June 9, 2022 12:33
@jdunkerley jdunkerley added the CI: Ready to merge This PR is eligible for automatic merge label Jun 9, 2022
grouped = table.aggregate [First "TextWithNothing" (order_by = Sort_Column_Selector.By_Name [Sort_Column.Name "Value" Sort_Direction.Descending, Sort_Column.Name "Flag"]), Last "ValueWithNothing" (order_by = Sort_Column_Selector.By_Name [Sort_Column.Name "Value" Sort_Direction.Descending])]
grouped = table.aggregate [First "TextWithNothing" (order_by = Sort_Column_Selector.By_Name [Sort_Column.Name "Value" Sort_Direction.Descending, Sort_Column.Name "Code"]), Last "ValueWithNothing" (order_by = Sort_Column_Selector.By_Name [Sort_Column.Name "Value" Sort_Direction.Descending])]
Copy link
Member

Choose a reason for hiding this comment

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

Don't you think it may be worth it to have this paired test as I suggested?

@mergify mergify bot merged commit e97d27e into develop Jun 10, 2022
@mergify mergify bot deleted the wip/jd/first-last-sort-column-selector-182413922 branch June 10, 2022 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants