Skip to content

Commit

Permalink
remove stream param from avro reader
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt711 committed Dec 19, 2024
1 parent 218e73b commit c29cdc4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions python/pylibcudf/pylibcudf/io/avro.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pylibcudf.io.types cimport SourceInfo, TableWithMetadata
from pylibcudf.libcudf.io.avro cimport avro_reader_options, avro_reader_options_builder
from pylibcudf.libcudf.types cimport size_type
from rmm._cuda.stream cimport Stream

from pylibcudf.libcudf.types cimport size_type

Expand All @@ -20,4 +19,4 @@ cdef class AvroReaderOptionsBuilder:
cpdef AvroReaderOptionsBuilder num_rows(self, size_type num_rows)
cpdef AvroReaderOptions build(self)

cpdef TableWithMetadata read_avro(AvroReaderOptions options, Stream stream = *)
cpdef TableWithMetadata read_avro(AvroReaderOptions options)
6 changes: 1 addition & 5 deletions python/pylibcudf/pylibcudf/io/avro.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Copyright (c) 2024, NVIDIA CORPORATION.

from rmm._cuda.stream import Stream

from pylibcudf.io.types import SourceInfo, TableWithMetadata

__all__ = ["AvroReaderOptions", "AvroReaderOptionsBuilder", "read_avro"]
Expand All @@ -16,6 +14,4 @@ class AvroReaderOptionsBuilder:
def num_rows(num_rows: int) -> AvroReaderOptionsBuilder: ...
def build(self) -> AvroReaderOptions: ...

def read_avro(
options: AvroReaderOptions, stream: Stream = None
) -> TableWithMetadata: ...
def read_avro(options: AvroReaderOptions) -> TableWithMetadata: ...
4 changes: 0 additions & 4 deletions python/pylibcudf/pylibcudf/io/avro.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ from pylibcudf.libcudf.io.avro cimport (
read_avro as cpp_read_avro,
)
from pylibcudf.libcudf.types cimport size_type
from rmm._cuda.stream cimport Stream

__all__ = ["read_avro", "AvroReaderOptions", "AvroReaderOptionsBuilder"]

Expand Down Expand Up @@ -128,7 +127,6 @@ cdef class AvroReaderOptionsBuilder:

cpdef TableWithMetadata read_avro(
AvroReaderOptions options,
Stream stream = None,
):
"""
Read from Avro format.
Expand All @@ -143,8 +141,6 @@ cpdef TableWithMetadata read_avro(
options: AvroReaderOptions
Settings for controlling reading behavior
"""
if stream is None:
stream = Stream()
with nogil:
c_result = move(cpp_read_avro(options.c_obj, stream.view()))

Expand Down
1 change: 0 additions & 1 deletion python/pylibcudf/pylibcudf/libcudf/io/avro.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ cdef extern from "cudf/io/avro.hpp" \

cdef cudf_io_types.table_with_metadata read_avro(
avro_reader_options &options,
cuda_stream_view stream,
) except +libcudf_exception_handler

0 comments on commit c29cdc4

Please sign in to comment.