o
    biq                     @   sD   d dl mZ d dlmZ d dlmZ erd dlZG dd deZdS )    )TYPE_CHECKING)ArrowBlockBuilder)FileBasedDatasourceNc                   @   s.   e Zd ZdZdZdddefddZdd	 Zd
S )BinaryDatasourcez8Binary datasource, for reading and writing binary files.bytesfzpyarrow.NativeFilepathc                 c   s2    |  }t }| j|i}|| | V  d S )N)readallr   _COLUMN_NAMEaddbuild)selfr   r   databuilderitem r   c/home/ubuntu/.local/lib/python3.10/site-packages/ray/data/_internal/datasource/binary_datasource.py_read_stream   s   

zBinaryDatasource._read_streamc                 C   s   dS )N   r   )r   r   r   r   _rows_per_file   s   zBinaryDatasource._rows_per_fileN)__name__
__module____qualname____doc__r
   strr   r   r   r   r   r   r   
   s
    r   )typingr   ray.data._internal.arrow_blockr   )ray.data.datasource.file_based_datasourcer   pyarrowr   r   r   r   r   <module>   s    