Skip to content

FileSource::create_file_opener takes a Result argument that is never used #14797

@AdamGS

Description

@AdamGS

Seems like somewhere in the shuffle of #14224, FileSource::create_file_opener got a Result argument which isn't very idiomatic IMO, especially as it doesn't seem like there's any special handling of it anywhere.

Another small point here is that the function itself returns a Result that doesn't seem to actually propagate any error (JSON and Parquet even panic), but I can imagine that some FileSource implementation in the future would like the ability to do that.
I have a Vortex PR that attempts to track the datafusion upstream and experiment with the new APIs, and while we do error there I think making those errors into panics or validating those invariants somewhere else would also make sense.

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