From e5929e89d6162884bd7e4eb8b6d2f4e8c709efff Mon Sep 17 00:00:00 2001 From: alexander-beedie Date: Sun, 22 Oct 2023 03:07:05 +0400 Subject: [PATCH] fix 'True' fast-path --- py-polars/polars/lazyframe/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py-polars/polars/lazyframe/frame.py b/py-polars/polars/lazyframe/frame.py index fb2d5cca6211..aa27c5c19a55 100644 --- a/py-polars/polars/lazyframe/frame.py +++ b/py-polars/polars/lazyframe/frame.py @@ -2653,7 +2653,7 @@ def filter( boolean_masks = [] # no-op; immediately matches all rows - if predicates == (True,) and not constraints: + if len(predicates) == 1 and predicates[0] is True and not constraints: return self.clone() # note: identify masks separately from predicates