public class SparkAvroReader
extends java.lang.Object
implements org.apache.avro.io.DatumReader<org.apache.spark.sql.catalyst.InternalRow>
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 |
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