apache / apache/datafusion

Make ScalarValue an ArrayRef Wrapper

Open
#7,353 14 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

### Is your feature request related to a problem or challenge?

We have recently standardised a scalar abstraction upstream, based around the existing Array abstractions.

The rationale behind this is expanded upon here https://github.com/apache/arrow-rs/pull/4393#issue-1750177364

### Describe the solution you'd like

I would like ScalarValue to just be a wrapper around an `ArrayRef`. This would avoid a huge amount of duplicated and/or boilerplate code, whilst also discouraging implementing non-vectorizable kernels based around ScalarValue.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading the ScalarValue and ArrayRef abstractions and the rationale in the linked upstream pull request. Map the code and tests affected by replacing ScalarValue with an ArrayRef wrapper, then define completion as preserving existing behavior while removing duplicated scalar-specific implementations.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.