Skip to content

Commit e2ad3c5

Browse files
authored
allow Table or RecordBatch for dataset (#222)
allow source argument pyarrow.dataset.dataset() to be RecordBatch | Table
1 parent f899bb3 commit e2ad3c5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pyarrow-stubs/dataset.pyi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,17 @@ def dataset(
195195
exclude_invalid_files: bool | None = None,
196196
ignore_prefixes: list[str] | None = None,
197197
) -> InMemoryDataset: ...
198+
@overload
199+
def dataset(
200+
source: RecordBatch | Table,
201+
schema: Schema | None = None,
202+
format: FileFormat | _DatasetFormat | None = None,
203+
filesystem: SupportedFileSystem | str | None = None,
204+
partitioning: Partitioning | PartitioningFactory | str | list[str] | None = None,
205+
partition_base_dir: str | None = None,
206+
exclude_invalid_files: bool | None = None,
207+
ignore_prefixes: list[str] | None = None,
208+
) -> InMemoryDataset: ...
198209
def write_dataset(
199210
data: Dataset | Table | RecordBatch | RecordBatchReader | list[Table] | Iterable[RecordBatch],
200211
base_dir: StrPath,

0 commit comments

Comments
 (0)