Skip to content

Add as_decimal_array(arr: &dyn Array) -> &DecimalArray #1312

@alamb

Description

@alamb

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
There are many as_XXX functions such as as_boolean_array to conveniently downcast arrays to the appropriate concrete Array types, but not one for DecimalArray 😢 .

The full list of supported ones is in the doc https://docs.rs/arrow/9.0.2/arrow/array/index.html#functions)

Describe the solution you'd like
I would like one for DecimalArray:

fn as_decimal_array(arr: &dyn Array) -> &DecimalArray {
...
}

Additional context
Context: I found while working on apache/datafusion#1475

Metadata

Metadata

Assignees

Labels

arrowChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changeloggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions