public class SparkAvroReader extends java.lang.Object implements org.apache.avro.io.DatumReader<org.apache.spark.sql.catalyst.InternalRow>, SupportsRowPosition
Constructor and Description |
---|
SparkAvroReader(Schema expectedSchema,
org.apache.avro.Schema readSchema) |
SparkAvroReader(Schema expectedSchema,
org.apache.avro.Schema readSchema,
java.util.Map<java.lang.Integer,?> constants) |
Modifier and Type | Method and Description |
---|---|
org.apache.spark.sql.catalyst.InternalRow |
read(org.apache.spark.sql.catalyst.InternalRow reuse,
org.apache.avro.io.Decoder decoder) |
void |
setRowPositionSupplier(java.util.function.Supplier<java.lang.Long> posSupplier) |
void |
setSchema(org.apache.avro.Schema newFileSchema) |
public SparkAvroReader(Schema expectedSchema, org.apache.avro.Schema readSchema)
public SparkAvroReader(Schema expectedSchema, org.apache.avro.Schema readSchema, java.util.Map<java.lang.Integer,?> constants)
public void setSchema(org.apache.avro.Schema newFileSchema)
setSchema
in interface org.apache.avro.io.DatumReader<org.apache.spark.sql.catalyst.InternalRow>
public org.apache.spark.sql.catalyst.InternalRow read(org.apache.spark.sql.catalyst.InternalRow reuse, org.apache.avro.io.Decoder decoder) throws java.io.IOException
read
in interface org.apache.avro.io.DatumReader<org.apache.spark.sql.catalyst.InternalRow>
java.io.IOException
public void setRowPositionSupplier(java.util.function.Supplier<java.lang.Long> posSupplier)
setRowPositionSupplier
in interface SupportsRowPosition