Skip to content

Conversation

@Fokko
Copy link
Contributor

@Fokko Fokko commented Feb 21, 2025

I got inspired by Arrow that also allows for this.

I got inspired by Arrow that also allows for this.
Copy link
Contributor

@kevinjqliu kevinjqliu left a comment

Choose a reason for hiding this comment

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

@kevinjqliu kevinjqliu merged commit 68a08b1 into apache:main Feb 21, 2025
7 checks passed
@Fokko Fokko deleted the fd-fix-boolean-expression branch February 21, 2025 16:14
@Fokko Fokko mentioned this pull request Feb 24, 2025
kevinjqliu pushed a commit that referenced this pull request Feb 24, 2025
Now we have the syntactic sugar
(#1697), we don't need
Lambda's anymore and can use the `operator.{and_,or_}` functions.

Also, the reduce is okay with just having a single argument, while
`And(*[EqualTo('a', 22)])` would fail.
```
python3
Python 3.10.14 (main, Mar 19 2024, 21:46:16) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import functools
>>> functools.reduce(lambda a, b: a + b, [1])
1
>>> functools.reduce(lambda a, b: a + b, [1, 2])
3
```
gabeiglio pushed a commit to Netflix/iceberg-python that referenced this pull request Aug 13, 2025
I got inspired by Arrow that also allows for this.
gabeiglio pushed a commit to Netflix/iceberg-python that referenced this pull request Aug 13, 2025
Now we have the syntactic sugar
(apache#1697), we don't need
Lambda's anymore and can use the `operator.{and_,or_}` functions.

Also, the reduce is okay with just having a single argument, while
`And(*[EqualTo('a', 22)])` would fail.
```
python3
Python 3.10.14 (main, Mar 19 2024, 21:46:16) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import functools
>>> functools.reduce(lambda a, b: a + b, [1])
1
>>> functools.reduce(lambda a, b: a + b, [1, 2])
3
```
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.

2 participants