Skip to content

Add method to Array interface to retrieve native Go values #462

@Mandukhai-Alimaa

Description

@Mandukhai-Alimaa

Describe the enhancement requested

In downstream projects using the Apache Arrow Go library — particularly in driver implementations and generic data ingestion layers — there’s often a need to extract values from an arrow.Array without knowing its concrete type ahead of time.

Currently, this requires verbose type switches and manual downcasting for each array type, which adds boilerplate and makes generic handling of data more complex.

To simplify this pattern, we propose adding a method to the Array interface that returns the Go-native equivalent of the value at a given index. For example:

ValueAsAny(index int) any

This change would significantly reduce boilerplate and improve ergonomics in downstream projects that need to interface with Arrow arrays in a type-agnostic way.

Component(s)

Other

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions