Fokko opened a new issue, #4601:
URL: https://github.com/apache/iceberg-python/issues/4601

   Follow-up to #4032.
   
   #4032 removed the `IN_PREDICATE_LIMIT` early return, so 
`_InclusiveMetricsEvaluator.visit_in` and `_ManifestEvalVisitor.visit_in` now 
compare every literal against the bounds of every file. This is linear in the 
number of literals per file. Locally it takes about 2 ms per data file for 100k 
keys, which adds up to about 20 s of planning on a table with 10k data files 
when the keys hit every file.
   
   Sorting the literals once per evaluator would make this O(log n) per file. 
`bisect` finds the first literal `>= lower_bound`, and the file can only match 
if that literal exists and is `<= upper_bound`.
   
   Please include a benchmark with the change. It should compare planning time 
on `main` and with the change, on a table with many data files (e.g. 10k) and a 
large `In` predicate (e.g. 100k keys). Cover both keys that hit a single file 
and keys spread across all files.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to