Skip to content

[Feature Request]: Support random access in the Go Filesystem API (io.ReaderAt / io.ReadSeeker) #39176

Description

@mdreizin

What would you like to happen?

The Go Filesystem API should support random access when the underlying filesystem provides it.

Currently, filesystem.Interface.OpenRead returns an io.ReadCloser, which only supports sequential reads. This makes it difficult to implement readers for file formats such as Parquet, ORC, Arrow IPC, and similar formats that rely on seeking to arbitrary offsets within a file.

Although storage backends such as GCS, S3, and local files support range reads or random access, that capability is not exposed through the Go Filesystem abstraction. As a result, implementations either need to buffer the entire file into memory or bypass the Beam Filesystem API and use storage-specific clients directly.

It would be useful if the Go Filesystem API exposed a random access interface, for example by returning an io.ReaderAt, io.ReadSeeker, or another abstraction that supports efficient seeking when the underlying filesystem is capable of it.

This would make it easier to build portable, efficient Beam I/O connectors and readers for columnar and indexed file formats without sacrificing performance or bypassing the Beam filesystem abstraction.

Issue Priority

Priority: 2 (default / most feature requests should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Prism Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions