
    &`i                     R    d dl mZ d dlmZmZmZmZ  G d dee                   ZdS )    )Generic)BlockBlockAccessor	BlockTypeTc                       e Zd ZdZededd fd            ZdeddfdZdeddfdZ	de
fd	Zdefd
ZdefdZdefdZdefdZdS )BlockBuilderzA builder class for blocks.blockreturnc                 N    t          j        |                                           S )N)r   	for_blockbuilder)r
   s    t/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/ray/data/_internal/block_builder.pyr   zBlockBuilder.for_block	   s    &u--55777    itemNc                     t           )z-Append a single row to the block being built.NotImplementedError)selfr   s     r   addzBlockBuilder.add       !!r   c                     t           )z0Append an entire block to the block being built.r   )r   r
   s     r   	add_blockzBlockBuilder.add_block   r   r   c                     t           )z8Whether building this block will yield a new block copy.r   r   s    r   will_build_yield_copyz"BlockBuilder.will_build_yield_copy   r   r   c                     t           )zBuild the block.r   r   s    r   buildzBlockBuilder.build   r   r   c                     t           )z-Return the number of rows added in the block.r   r   s    r   num_rowszBlockBuilder.num_rows   r   r   c                     t           )z2Return the estimated memory usage so far in bytes.r   r   s    r   get_estimated_memory_usagez'BlockBuilder.get_estimated_memory_usage!   r   r   c                     t           )zReturn the block type.r   r   s    r   
block_typezBlockBuilder.block_type%   r   r   )__name__
__module____qualname____doc__staticmethodr   r   r   r   r   boolr   r   intr    r"   r   r$    r   r   r	   r	      s       %%8 8> 8 8 8 \8" "d " " " ""u " " " " ""t " " " ""u " " " ""# " " " ""C " " " ""I " " " " " "r   r	   N)typingr   ray.data.blockr   r   r   r   r	   r,   r   r   <module>r/      ss          = = = = = = = = = = = =!" !" !" !" !"71: !" !" !" !" !"r   