Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Done
-
1.17.0
-
None
Description
Some format plugins that use third party parsers throw errors when they receive compressed input streams from Drill. This PR proposes to introduce three utility functions to the DrillFileSystem:
- isCompressed(<path>): Returns true/false whether the input file is compressed
- getCodec(<path>): This method returns the codec of the file if any
- openDecompressedInputStream(<path>): Returns an InputStream that should be readable by parsers that read raw bytes. This method converts the original InputStream to a byte[] first, then returns that via a ByteArrayInputStream.