JingsongLi commented on code in PR #7252: URL: https://github.com/apache/paimon/pull/7252#discussion_r2788574024
########## paimon-python/pypaimon/read/scanner/file_scanner.py: ########## @@ -41,6 +40,49 @@ from pypaimon.manifest.simple_stats_evolutions import SimpleStatsEvolutions +def _row_ranges_from_predicate(predicate: Optional[Predicate]) -> Optional[List]: + from pypaimon.globalindex.range import Range + from pypaimon.table.special_fields import SpecialFields + + if predicate is None: + return None + + def visit(p: Predicate): + if p.method == 'and': + result = None + for child in p.literals: + sub = visit(child) + if sub is None: + continue + result = Range.and_(result, sub) if result is not None else sub + if not result: + return result + return result + if p.method == 'or': Review Comment: And between, see https://github.com/apache/paimon/pull/7255 -- 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]
