Package org.apache.iceberg.spark.data
Class SparkAvroReader
java.lang.Object
org.apache.iceberg.spark.data.SparkAvroReader
- All Implemented Interfaces:
org.apache.avro.io.DatumReader<org.apache.spark.sql.catalyst.InternalRow>
,SupportsRowPosition
public class SparkAvroReader
extends Object
implements org.apache.avro.io.DatumReader<org.apache.spark.sql.catalyst.InternalRow>, SupportsRowPosition
-
Constructor Summary
ConstructorDescriptionSparkAvroReader
(Schema expectedSchema, org.apache.avro.Schema readSchema) SparkAvroReader
(Schema expectedSchema, org.apache.avro.Schema readSchema, Map<Integer, ?> constants) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.spark.sql.catalyst.InternalRow
read
(org.apache.spark.sql.catalyst.InternalRow reuse, org.apache.avro.io.Decoder decoder) void
setRowPositionSupplier
(Supplier<Long> posSupplier) void
setSchema
(org.apache.avro.Schema newFileSchema)
-
Constructor Details
-
SparkAvroReader
-
SparkAvroReader
-
-
Method Details
-
setSchema
public void setSchema(org.apache.avro.Schema newFileSchema) - Specified by:
setSchema
in interfaceorg.apache.avro.io.DatumReader<org.apache.spark.sql.catalyst.InternalRow>
-
read
public org.apache.spark.sql.catalyst.InternalRow read(org.apache.spark.sql.catalyst.InternalRow reuse, org.apache.avro.io.Decoder decoder) throws IOException - Specified by:
read
in interfaceorg.apache.avro.io.DatumReader<org.apache.spark.sql.catalyst.InternalRow>
- Throws:
IOException
-
setRowPositionSupplier
- Specified by:
setRowPositionSupplier
in interfaceSupportsRowPosition
-