Skip to content

Commit

Permalink
Merge branch 'dx-parquet-dispatch' into simplify-remote-io
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzamora committed Aug 13, 2024
2 parents 491c140 + ffcc137 commit 9313d54
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions python/dask_cudf/dask_cudf/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,41 @@ def from_dict(
constructor=constructor,
)

@staticmethod
def read_parquet(*args, engine=None, **kwargs):
import dask_expr as dx

from dask_cudf.io.parquet import CudfEngine

return _default_backend(
dx.read_parquet, *args, engine=CudfEngine, **kwargs
)

@staticmethod
def read_csv(
path,
*args,
header="infer",
dtype_backend=None,
storage_options=None,
**kwargs,
):
import dask_expr as dx
from fsspec.utils import stringify_path

if not isinstance(path, str):
path = stringify_path(path)
return dx.new_collection(
dx.io.csv.ReadCSV(
path,
dtype_backend=dtype_backend,
storage_options=storage_options,
kwargs=kwargs,
header=header,
dataframe_backend="cudf",
)
)

@staticmethod
def read_json(*args, **kwargs):
from dask_cudf.io.json import read_json as read_json_impl
Expand Down

0 comments on commit 9313d54

Please sign in to comment.