zjw1111 commented on PR #10101: URL: https://github.com/apache/paimon/pull/10101#issuecomment-5843918566
> [P2] Avoid an extra file-status lookup for V1 indexes > > `FileIndexPredicate(Path, ...)` now calls `fileIO.getFileStatus(path)` before opening every independent index file. `FileIndexEvaluator` constructs this predicate per indexed data file during filtered scans. Since V1 remains the default and its header can be read without the container length, existing V1 scans incur an additional metadata lookup per index file, which can be a remote request on object stores. Only V2 needs the length to locate its trailer. > > Could we determine the container version first and obtain the length only for V2 (or reuse a length already available to the caller)? That would keep the V1 read-path cost unchanged. > > Location: `paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexPredicate.java:61-64`. Thank you for the detailed review. I’ve been on vacation these past few days, and I’ll fix this issue after my vacation ends on October 8. -- 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]
