guiyanakuang commented on a change in pull request #810: URL: https://github.com/apache/orc/pull/810#discussion_r682234526
########## File path: java/core/src/java/org/apache/orc/impl/ReaderImpl.java ########## @@ -569,7 +561,13 @@ public ReaderImpl(Path path, OrcFile.ReaderOptions options) throws IOException { this.rowIndexStride = tail.getFooter().getRowIndexStride(); this.contentLength = tail.getFooter().getContentLength(); this.numberOfRows = tail.getFooter().getNumberOfRows(); - this.userMetadata = tail.getFooter().getMetadataList(); + this.userMetadata = tail.getFooter().getMetadataList() + .stream().collect(Collectors.toMap( Review comment: > Thank you for making a PR, @guiyanakuang . Do you think we can have a benchmark result for your claim? > > > There may be performance problems if there are more userMetadata keys > > cc @pgaref , @williamhyun Sorry for the late reply due to different time zones. I made a guess based on the time complexity of the algorithm and have not yet benchmarked it. getMetadataValue is used in compatibility checking and metadata merging, which would have an O(n^2) time complexity if used in a loop. -- 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: dev-unsubscr...@orc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org