AvroReader (avro/read.rs)

polars · crates/polars-io/src/avro/read.rs · rust · MIT
database, tag:knn-classified

Module exposing: AvroReader

// Source: https://github.com/pola-rs/polars | License: MIT | Copyright 2025 Ritchie Vink
// Provided via justclaw.it.com; keep this notice with the code.
use std::io::{Read, Seek};

use polars_arrow::io::avro::{self, read};
use polars_arrow::record_batch::RecordBatch;
use polars_core::error::to_compute_err;
use polars_core::prelude::*;

use crate::prelude::*;
use crate::shared::{ArrowReader, finish_reader};

/// Read [Apache Avro] format into a [`DataFrame`]
///
/// [Apache Avro]: https://avro.apache.org
///
/// # Example
/// ```
/// use std::fs::File;
/// use polars_core::prelude::*;
/// use polars_io::avro::AvroReader;
/// use polars_io::SerReader;
///
/// fn example() -> PolarsResult<DataFrame> {
///     let file = File::open("file.avro").expect("file not found");
///
///     AvroReade

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key