Skip to content

Commit

Permalink
false write stats
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed Oct 4, 2024
1 parent 58f5cb6 commit 4cc6e27
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fsspec/implementations/reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,6 @@ def __init__(
Engine choice for reading parquet files. (default is "fastparquet")
"""

from importlib.util import find_spec

if find_spec("pyarrow") is None:
raise ImportError("engine choice `pyarrow` is not installed.")

self.root = root
self.chunk_sizes = {}
self.out_root = out_root or self.root
Expand All @@ -151,6 +146,11 @@ def __init__(
# TODO: derive fs from `root`
self.fs = fsspec.filesystem("file") if fs is None else fs

from importlib.util import find_spec

if self.engine == "pyarrow" and find_spec("pyarrow") is None:
raise ImportError("engine choice `pyarrow` is not installed.")

def __getattr__(self, item):
if item in ("_items", "record_size", "zmetadata"):
self.setup()
Expand Down Expand Up @@ -480,7 +480,7 @@ def write(self, field, record, base_url=None, storage_options=None):
self.fs.mkdirs(f"{base_url or self.out_root}/{field}", exist_ok=True)

if self.engine == "pyarrow":
df_backend_kwargs = {}
df_backend_kwargs = {"write_statistics": False}
elif self.engine == "fastparquet":
df_backend_kwargs = {
"stats": False,
Expand Down

0 comments on commit 4cc6e27

Please sign in to comment.