| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Mirror the parquet/csv/json/arrow reader pattern for Avro. New AvroReadOptions Java class with fileExtension (default ".avro") and schema(Schema) setters; SessionContext.registerAvro/readAvro overloads; native/src/avro.rs JNI module that dispatches to upstream SessionContext::register_avro / read_avro. DataFusion's avro feature is not in its default set, so the datafusion crate dependency is updated to features = ["avro"]. The release .so grows ~4.4 MiB (+3.1%, 140.2 -> 144.5 MiB unstripped). Avro is roughly comparable in scope to the parquet/csv readers that are already in the default set; always-on means callers can rely on Avro without juggling Cargo features through the Maven build.
There was a problem hiding this comment.
Thanks @LantaoJin
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Which issue does this PR close?
Rationale for this change
DataFusion 53.1 supports Avro via SessionContext::read_avro / register_avro. The Java binding for Avro is still missing.
I measured release builds before and after on the same machine: libdatafusion_jni.so grew from 146,983,936 bytes to 151,566,800 bytes, +4.4 MiB unstripped. Modest given that Avro is comparable in scope to the parquet/csv readers that are already on by default. Always-on means Java callers can rely on Avro being present without juggling Cargo features through the Maven build.
What changes are included in this PR?
Are these changes tested?
Yes -- 9 new tests across AvroReadOptionsTest and SessionContextAvroTest.
Are there any user-facing changes?
Yes -- purely additive. New public API:
The new org.apache.datafusion.protobuf.AvroReadOptionsProto generated class is also exposed via the protobuf-Java output, consistent with how CsvReadOptionsProto, ArrowReadOptionsProto, etc. are exposed. No API removals, no deprecations, no behavior change for existing callers.
The native binary grows ~4.4 MiB unstripped to enable Avro's datasource crate (see Rationale).