Skip to content

ArrowFSWrapper opens as seekable=False by default #1175

@tdoehmen

Description

@tdoehmen

First, thanks for the great work! I tried using the ArrowFSWrapper to register Arrow filesystems with DuckDB's fsspec integration (https://duckdb.org/docs/guides/python/filesystems) as it would be a really cool way to access HDFS from DuckDB.

However, there were two issues that I encountered, that I want to bring to your attention.

The DuckDB fsspec integration assumes that, if the filesystem is capable of seeking, the file handle returned from .open() is seekable. For ArrowFSWrapped fsspec filesystems, however, seekable has to be set to explicitly upon calling .open(). Since seekable= is not a standard fsspec parameter, DuckDB is not aware of it and does not set it.

A solution on my side would be to write another wrapper around ArrowFSWrapper that overwrites the .open() behaviour, but I wonder
why the ArrowFSWrapped filesystems are non-seekable by default. IMO it would increase the consistency with other fsspec filesystems if seekable was True by default. Would you be open to accepting a PR that changes the default of ArrowFSWrapper
._open(seekable=) to True?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions