You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/12/01 03:10:35 UTC

[GitHub] [pinot] snleee commented on a diff in pull request #9884: WIP - feat: add compressed file support for ORCRecordReader

snleee commented on code in PR #9884:
URL: https://github.com/apache/pinot/pull/9884#discussion_r1036648934


##########
pinot-plugins/pinot-input-format/pinot-orc/src/main/java/org/apache/pinot/plugin/inputformat/orc/ORCRecordReader.java:
##########
@@ -106,6 +110,19 @@ public void init(File dataFile, @Nullable Set<String> fieldsToRead, @Nullable Re
     _nextRowId = 0;
   }
 
+  private File unzipIfRequired(File dataFile) throws IOException {
+    if (dataFile.getName().endsWith(".gz")) {

Review Comment:
   I think that the better approach is to add a helper function in `RecordReaderUtils` to identify whether the file is `gzipped` or not instead of depending on the extension. I have seen the cases where people deal with gzipped files (but not end with `.gz`).



-- 
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: commits-unsubscribe@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org