Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use C++ to parse and filter parquet footers. #5310

Merged
merged 11 commits into from
May 11, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.apache.avro.file.{DataFileConstants, SeekableInput}
import org.apache.avro.file.DataFileConstants.{MAGIC, SYNC_SIZE}
import org.apache.avro.io.{BinaryData, BinaryDecoder, DecoderFactory}

private class SeekableInputStream(in: SeekableInput) extends InputStream with SeekableInput {
private class AvroSeekableInputStream(in: SeekableInput) extends InputStream with SeekableInput {
var oneByte = new Array[Byte](1)

override def read(): Int = {
Expand Down Expand Up @@ -91,7 +91,7 @@ case class BlockInfo(blockStart: Long, blockLength: Long, blockDataSize: Long, c
* AvroDataFileReader parses the Avro file to get the header and all block information
*/
class AvroDataFileReader(si: SeekableInput) extends AutoCloseable {
private val sin = new SeekableInputStream(si)
private val sin = new AvroSeekableInputStream(si)
sin.seek(0) // seek to the start of file and get some meta info.
private var vin: BinaryDecoder = DecoderFactory.get.binaryDecoder(sin, vin);
private val header: Header = new Header()
Expand Down
Loading