You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by GitBox <gi...@apache.org> on 2021/08/03 21:57:17 UTC

[GitHub] [orc] omalley commented on a change in pull request #810: ORC-904: Use Map for userMetadata in ReaderImpl

omalley commented on a change in pull request #810:
URL: https://github.com/apache/orc/pull/810#discussion_r682128050



##########
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:
       The java stream apis are very slow. It would perform better if you used a loop. This is especially important, because now the set is build preemptively, even if the user doesn't need the metadata values.




-- 
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-unsubscribe@orc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org