Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ci/lint/pyrefly-excluded-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ python/ray/data/_internal/datasource/parquet_datasink.py
python/ray/data/_internal/datasource/parquet_datasource.py
python/ray/data/_internal/datasource/range_datasource.py
python/ray/data/_internal/datasource/sql_datasource.py
python/ray/data/_internal/datasource/table/file_writer.py
python/ray/data/_internal/datasource/tfrecords_datasink.py
python/ray/data/_internal/datasource/tfrecords_datasource.py
python/ray/data/_internal/datasource/torch_datasource.py
Expand Down Expand Up @@ -215,6 +216,8 @@ python/ray/data/tests/datasource/test_numpy.py
python/ray/data/tests/datasource/test_pandas.py
python/ray/data/tests/datasource/test_parquet.py
python/ray/data/tests/datasource/test_snowflake.py
python/ray/data/tests/datasource/test_table_datasink.py
python/ray/data/tests/datasource/test_table_datasink_integration.py
python/ray/data/tests/datasource/test_text.py
python/ray/data/tests/datasource/test_tf.py
python/ray/data/tests/datasource/test_tfrecords.py
Expand Down
26 changes: 26 additions & 0 deletions python/ray/data/_internal/datasource/table/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""Generic table datasink framework.

This module is the shared abstraction sitting under the Iceberg and Delta
datasinks. It owns the distributed write lifecycle and delegates every
format-specific concern (table loading, per-block file writing, transactional
commit) to a ``TableAdapter``.

Supporting a new table format reduces to implementing a new adapter.
"""

from .adapter import SupportsUpserts, TableAdapter
from .file_writer import DataFileWriter, ParquetFileWriter
from .modes import SaveMode, UpsertSemantics
from .result import TableWriteTaskResult
from .table_datasink import TableDatasink
Comment on lines +11 to +15

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's not use relative imports


__all__ = [
"DataFileWriter",
"ParquetFileWriter",
"SaveMode",
"SupportsUpserts",
"TableAdapter",
"TableDatasink",
"TableWriteTaskResult",
"UpsertSemantics",
]
375 changes: 375 additions & 0 deletions python/ray/data/_internal/datasource/table/adapter.py

Large diffs are not rendered by default.

Loading
Loading