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` instead of
depending on the extension. I have seen the cases where people deal with
gzipped files (but not end with `.gz`).
There are multiple approaches:
https://stackoverflow.com/questions/30507653/how-to-check-whether-file-is-gzip-or-not-in-java
I think that we can try to open the file with `GZIPInputStream` and check
for the exception.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]