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

Allow Filter_Condition to be inverted. #8861

Merged
merged 21 commits into from
Feb 7, 2024
Merged

Conversation

jdunkerley
Copy link
Member

@jdunkerley jdunkerley commented Jan 25, 2024

Pull Request Description

  • Various linting fixes (doc comments and type annotations etc.).
  • Add an action to determine if a Filter_Condition is keep or remove.
2024-01-25_13-14-44.mp4
  • Remove Not_In, Not_Contains and Not_Like from Filter_Condition.

  • Ability to use an Expression as a Column_Ref.

2024-02-02_12-42-18.mp4

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed, the GUI was tested when built using ./run ide build.

@jdunkerley jdunkerley force-pushed the wip/jd/filter_remove_keep branch 2 times, most recently from b933552 to f3995a1 Compare February 6, 2024 10:43
@jdunkerley jdunkerley marked this pull request as ready for review February 6, 2024 18:24
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

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

Add an action to determine if a Filter_Condition is keep or remove.
Remove Not_In, Not_Contains and Not_Like from Filter_Condition.

I was rather expecting introduction of

type Filter_Condition
    Not condition:Filter_Condition

the parameters of the methods would not need to be duplicated. But probably the Not constructor approach has its own quirks as well.

@jdunkerley
Copy link
Member Author

Add an action to determine if a Filter_Condition is keep or remove.
Remove Not_In, Not_Contains and Not_Like from Filter_Condition.

I was rather expecting introduction of

type Filter_Condition
    Not condition:Filter_Condition

the parameters of the methods would not need to be duplicated. But probably the Not constructor approach has its own quirks as well.

Will have a play with the Not approach post merge - with the new GUI might actually work well (wouldn't have with the old one).

Comment on lines -112 to +123
group_builder.specify "Not_Equal test cases" pending="Specification needs clarifying, see: https://github.com/enso-org/enso/issues/5241#issuecomment-1480167927" <|
group_builder.specify "Not_Equal test cases" <|
Copy link
Member

Choose a reason for hiding this comment

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

Good to see this test re-enabled.

Comment on lines +128 to +130
t.filter "X" (Filter_Condition.Not_Equal to=(t.at "Y")) . at "X" . to_vector . should_equal [3, 12]
t.filter "X" (Filter_Condition.Not_Equal to=(Column_Ref.Name "Y")) . at "X" . to_vector . should_equal [3, 12]
t.filter "X" (Filter_Condition.Not_Equal to=(Column_Ref.Expression "[Y]")) . at "X" . to_vector . should_equal [3, 12]
Copy link
Member

Choose a reason for hiding this comment

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

I'm tempted to test the Filter_Action.Remove here as well, to clearly see what is the NULL behaviour with that.

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.

Looks all good

@jdunkerley jdunkerley added the CI: Ready to merge This PR is eligible for automatic merge label Feb 7, 2024
@mergify mergify bot merged commit 0c39f8e into develop Feb 7, 2024
26 of 27 checks passed
@mergify mergify bot deleted the wip/jd/filter_remove_keep branch February 7, 2024 14:36
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.

None yet

4 participants