Skip to content

Commit

Permalink
Catch missing pyarrow import
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed May 4, 2017
1 parent 9ef62f2 commit b7be498
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dask/dataframe/io/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,12 @@ def normalize_ParquetFile(pf):
return (type(pf), pf.fn, pf.sep) + normalize_token(pf.open)


if pyarrow_parquet:
@partial(normalize_token.register, pyarrow_parquet.ParquetDataset)
try:
from pyarrow.parquet import ParquetDataset
except ImportError:
pass
else:
@partial(normalize_token.register, ParquetDataset)
def normalize_PyArrowParquetDataset(ds):
return (type(ds), ds.paths)

Expand Down

0 comments on commit b7be498

Please sign in to comment.