Skip to content

Commit dd7bc84

Browse files
authored
Apply suggestion from @kevinjqliu
1 parent ebfebb1 commit dd7bc84

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

pyiceberg/expressions/visitors.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1905,12 +1905,7 @@ def visit_starts_with(self, term: BoundTerm, literal: LiteralValue) -> BooleanEx
19051905
return AlwaysFalse()
19061906

19071907
def visit_not_starts_with(self, term: BoundTerm, literal: LiteralValue) -> BooleanExpression:
1908-
starts_with_result = self.visit_starts_with(term, literal)
1909-
# Should return opposite of visit_starts_with
1910-
if isinstance(starts_with_result, AlwaysTrue):
1911-
return AlwaysFalse()
1912-
else:
1913-
return AlwaysTrue()
1908+
return ~self.visit_starts_with(term, literal)
19141909

19151910
def visit_bound_predicate(self, predicate: BoundPredicate) -> BooleanExpression:
19161911
"""

0 commit comments

Comments
 (0)