compute. CastOptions add option to cast to null value when cast fails

Open
#463 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
go
Domain
data

Research direction

Start by reading the compute.CastArray and compute.CastToType entry points and the existing default cast options. Trace how failed element casts currently produce initial values, then define the option's expected null behavior while preserving successful casts. Done means failed elements become null and the remaining values cast successfully, with coverage for both entry points.

Written by the indexing model from the issue text.

Description

Type: enhancement
Describe the enhancement requested

I am using compute. CastArray and compute. CastToType for casting an array to a compatible type. If one element in the array can not be casted, then the whole array fails. Is it possible to set those failed ones to null value while casting the remaining of the array successfully? I tried setting those default cast options to true, but it seems the behavior is setting those failed ones to initial value. Thanks for your help!

Component(s)

Other

Dominant language
Assembly
Stars
406
Forks
146
Avg merge
2d 8h
Merged PRs (30d)
93

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-go

All issues in apache/arrow-go

Similar issues

More Data Engineering issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.