apache / apache/arrow

[MATLAB] Vectorize the `field` method of `arrow.tabular.Schema`

Open
#37,165 1 comment 0 reactions 0 assignees View on GitHub
Component: MATLAB Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

Right now, the `field()` method of `arrow.tabular.Schema` only accepts scalar index values.

```matlab
>> s = arrow.schema([arrow.field("A", arrow.int16), arrow.field("B", arrow.int32()), arrow.field("C", arrow.int64())]);

>> s.field([1 2])
Error using arrow.tabular.Schema/field
Expected input to be a scalar.
```

It would be nice the `field()` method accepted non-scalar inputs.

### Component(s)

MATLAB

Contributor guide

Open the contributing guide

Research direction

Start with the MATLAB implementation of arrow.tabular.Schema/field and reproduce the scalar and vector examples from the issue. Determine the expected behavior for non-scalar inputs, then add coverage showing that s.field([1 2]) succeeds and returns the requested fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
matlab
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.