create_base_text_units streaming #2221
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new streaming table abstraction to the storage layer, enabling efficient row-by-row access and transformation for both CSV and Parquet backends. The changes add a unified
Tableinterface, implement CSV and Parquet streaming table classes, and update the provider modules to support these new interfaces and transformers. The overall design improves memory efficiency and extensibility for large dataset processing.Table Abstraction and Streaming Interface
Tableintable.pyto provide a unified streaming row-by-row interface with async iteration, write, and close methods. Supports row transformation and async context management.RowTransformertype for flexible row transformation, allowing both callable functions and classes (e.g., Pydantic models) to be used for row processing.CSV Table Streaming Implementation
CSVTableincsv_table.pyfor streaming access to CSV tables, supporting async iteration, row transformation, row existence checks, and writing rows with automatic header management.CSVTableProviderto enforceFileStoragebackend, import new streaming classes, and expose anopenmethod for streaming table access with optional row transformation. [1] [2] [3]Parquet Table Streaming Implementation
ParquetTableinparquet_table.pyto simulate streaming for Parquet tables by loading DataFrames and yielding rows, with support for row transformation and batch writing.ParquetTableProviderto import new streaming classes and expose anopenmethod for streaming table access with optional row transformation. [1] [2]Provider Interface Unification
TableProviderbase class to include the newopenmethod, standardizing streaming table access across different storage backends. [1] [2]tables/__init__.pyto include the newTableclass.Supporting Changes
get_pathmethod toFileStoragefor easier file path access needed by streaming table implementations.Tableabstraction.