mzabaluev commented on code in PR #8930: URL: https://github.com/apache/arrow-rs/pull/8930#discussion_r2731014140
########## arrow-avro/src/reader/async_reader/builder.rs: ########## @@ -0,0 +1,241 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use crate::codec::AvroFieldBuilder; +use crate::errors::AvroError; +use crate::reader::async_reader::ReaderState; +use crate::reader::header::{Header, HeaderDecoder}; +use crate::reader::record::RecordDecoder; +use crate::reader::{AsyncAvroFileReader, AsyncFileReader, Decoder}; +use crate::schema::{AvroSchema, FingerprintAlgorithm, SCHEMA_METADATA_KEY}; +use indexmap::IndexMap; +use std::ops::Range; + +const DEFAULT_HEADER_SIZE_HINT: u64 = 16 * 1024; // 16 KB + +/// Builder for an asynchronous Avro file reader. +pub struct AsyncAvroFileReaderBuilder<R> { Review Comment: This name is unwieldy, though it does not need to be imported. I'd rather do the idiomatic Rust thing: expose the module as public and export the builder with a terse name under the module path: `crate::reader::async_reader::ReaderBuilder`. This is also because I want to add another builder typestate to this API in a follow-up PR, and I don't want its name to be even longer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
