apache / apache/arrow-java

[Java] Add accessors to get type parameters from vector classes

Offen
#427 9 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Type: enhancement
Vorherrschende Sprache
Java
Sterne
94
Forks
152
Ø Merge
3 T. 16 Std.
Gemergte PRs (30 T.)
11

Beschreibung

Vector classes contain private copies of each param in the `ArrowType`, but does not have any public api to access them. So if given a vector you would have to get the `Field` from the and cast to the correct type. For example, with a `TimeStampMicroTZVector` and trying to get the timezone:

```

if field.getType.isInstanceOf[ArrowType.Timestamp] &&
field.getType.asInstanceOf[ArrowType.Timestamp].getTimezone
```

It would be more convenient to have direct accessors for these type params for the vector types that have parameters:

- DecimalVector
- FixedSizeBinaryVector
- ListVector
- TimeStamps with timezones
- FixedSizedListVector
- Unions

**Reporter**: [Bryan Cutler](https://issues.apache.org/jira/browse/ARROW-1361) / @BryanCutler
#### PRs and other links:
- [GitHub Pull Request apache/arrow#972](https://github.com/apache/arrow/pull/972)

**Note**: *This issue was originally created as [ARROW-1361](https://issues.apache.org/jira/browse/ARROW-1361). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Überprüfe zuerst die im Issue genannten Vektorklassen und den verlinkten Pull Request apache/arrow#972. Prüfe, wie deren privaten ArrowType-Parameter dargestellt werden, und bestätige anschließend, dass direkte Accessoren für DecimalVector, FixedSizeBinaryVector, ListVector, zeitzonenbewusste Timestamp-Vektoren, FixedSizeListVector und Unions existieren.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
backend-api-design
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.