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

[Backport 1.15] fix: filter expression with numeric function #516

Merged
merged 4 commits into from
Sep 20, 2022

Conversation

github-actions[bot]
Copy link

Description

Backport of #514 to 1.15.

relates to #507

- a list should be filtered with a numeric function
- the expression should return the element based on the index that is returned from the numeric function

(cherry picked from commit a9d42ce)
- if the filter of a list returns a number then the expression should return the item at the given index
- note that the code could look more elegant but we want to avoid unintended function invocation because the invocations are visible by the function provider (#359)
- we could improve the code later if the function defines the types of the arguments and the return value (#295)

(cherry picked from commit a2bcf5b)
- if the filter function returns a number then it should be invoked only once

(cherry picked from commit 5373c0e)
- the expression should fail if the filter doesn't return a boolean or number
- it should fail if the filter doesn't return always a boolean after the first invocation

(cherry picked from commit e7d6f9e)
Copy link
Member

@saig0 saig0 left a comment

Choose a reason for hiding this comment

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

👍

@saig0 saig0 merged commit eb63fa5 into 1.15 Sep 20, 2022
@saig0 saig0 deleted the backport-514-to-1.15 branch September 20, 2022 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant