From 6a9f571bf718a7e69e060be5d94b5886dd6729b7 Mon Sep 17 00:00:00 2001 From: Sreesh Maheshwar Date: Thu, 10 Jul 2025 18:19:58 +0530 Subject: [PATCH] Nit: Clean up comments in `DataScan::_build_residual_evaluator` --- pyiceberg/table/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyiceberg/table/__init__.py b/pyiceberg/table/__init__.py index 1dc7a29cc1..41e1ca9c53 100644 --- a/pyiceberg/table/__init__.py +++ b/pyiceberg/table/__init__.py @@ -1841,13 +1841,11 @@ def _build_metrics_evaluator(self) -> Callable[[DataFile], bool]: def _build_residual_evaluator(self, spec_id: int) -> Callable[[DataFile], ResidualEvaluator]: spec = self.table_metadata.specs()[spec_id] + from pyiceberg.expressions.visitors import residual_evaluator_of + # The lambda created here is run in multiple threads. # So we avoid creating _EvaluatorExpression methods bound to a single # shared instance across multiple threads. - # return lambda data_file: (partition_schema, partition_expr, self.case_sensitive)(data_file.partition) - from pyiceberg.expressions.visitors import residual_evaluator_of - - # assert self.row_filter == False return lambda datafile: ( residual_evaluator_of( spec=spec,