apache / apache/datafusion

InListExpr: allow `make_set` for use

Open
#17,118 0 comments 0 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?

Hey team 👋🏻

I have been trying to use `InListExpr` and I wanted to make use of [static_filter](https://github.com/apache/datafusion/blob/c4f037568632ec5c422f0082c627e1619170190b/datafusion/physical-expr/src/expressions/in_list.rs#L55), but it seems there's no way to use inbuilt [ArrayHashSet](https://github.com/apache/datafusion/blob/c4f037568632ec5c422f0082c627e1619170190b/datafusion/physical-expr/src/expressions/in_list.rs#L74-L81).

I tried to go through issues, comments, etc. but couldn't find a reason why it is kept private. If I missed something, would be curious to get a link for the same 😅.

### Describe the solution you'd like

If it wasn't intentional, can we mark [make_set](
https://github.com/apache/datafusion/blob/c4f037568632ec5c422f0082c627e1619170190b/datafusion/physical-expr/src/expressions/in_list.rs#L184-L210) as public and expose from `in_list` module?

### Describe alternatives you've considered

Not sure how to use a set instead of list otherwise, would be curious to know if there's a way to do that except creating a new `ScalarFunctionExpr`.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start in datafusion/physical-expr/src/expressions/in_list.rs and inspect InListExpr, ArrayHashSet, and the private make_set function. Check how the in_list module is exposed, then make_set is done when callers can use it as a public API without breaking the physical-expression crate's existing tests or visibility conventions.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.