Tan-JiaLiang commented on code in PR #6097: URL: https://github.com/apache/paimon/pull/6097#discussion_r2286919109
########## paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexPredicate.java: ########## @@ -71,7 +71,8 @@ public FileIndexPredicate(SeekableInputStream inputStream, RowType fileRowType) this.reader = FileIndexFormat.createReader(inputStream, fileRowType); } - public FileIndexResult evaluate(@Nullable Predicate predicate) { + public FileIndexResult evaluate( + @Nullable Predicate predicate, @Nullable FileIndexResult input) { Review Comment: > Why add input here? You can just use FileIndexPredicate.evaluate(predicate) and use result to add input. It ok to rollback, just want to same as the evaluateTopN. > Also modify visitTopN, it seems only need SortValue value, int limit. We don't need to pass FileIndexResult to the method. We need it. We need to pick TopN base the last step FileIndexResult(e.g. Selection AND NOT deletion). Also, maybe in the future, if we support file index fully pushdown from the engine. The FileIndexResult is from the Predicate Filter. e.g. the column `type` EQ predicate result evaluate first, then the result pass to the TopN evaluation. ```sql SELECT * FROM T WHERE type='click' ORDER BY time DESC LIMIT 10; ``` -- 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: issues-unsubscr...@paimon.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org