(
    decoder,
    header,
    codec,
    writer_schema,
    named_schemas,
    reader_schema,
    return_record_name=False,
)
Return iterator over avro records.
Return iterator over avro records.
Return iterator over avro records .
def _iter_avro_records(
    decoder,
    header,
    codec,
    writer_schema,
    named_schemas,
    reader_schema,
    return_record_name=False,
):
    """Return iterator over avro records."""
    sync_marker = header["sync"]

    read_block = BLOCK_READERS.get(codec)
    if not read_block:
        raise ValueError(f"Unrecognized codec: {codec}")

    block_count = 0
    while True:
        try:
            block_count = decoder.read_long()
        except StopIteration:
            return

        block_fo = read_block(decoder)

        for i in range(block_count):
            yield read_data(
                BinaryDecoder(block_fo),
                writer_schema,
                named_schemas,
                reader_schema,
                return_record_name,
            )

        skip_sync(decoder.fo, sync_marker)
def _iter_avro_records ( decoder , header , codec , writer_schema , named_schemas , reader_schema , return_record_name = False , ) : sync_marker = header [ "sync" ] read_block = BLOCK_READERS . get ( codec ) if not read_block : raise ValueError ( f"Unrecognized codec: {codec}" ) block_count = 0 while True : try : block_count = decoder . read_long ( ) except StopIteration : return block_fo = read_block ( decoder ) for i in range ( block_count ) : yield read_data ( BinaryDecoder ( block_fo ) , writer_schema , named_schemas , reader_schema , return_record_name , ) skip_sync ( decoder . fo , sync_marker )