Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support filter for ARRAY #9857

Closed
jayzhan211 opened this issue Mar 29, 2024 · 3 comments · Fixed by #11091
Closed

Support filter for ARRAY #9857

jayzhan211 opened this issue Mar 29, 2024 · 3 comments · Fixed by #11091
Labels
enhancement New feature or request

Comments

@jayzhan211
Copy link
Contributor

Is your feature request related to a problem or challenge?

It would be nice if we could filter array type

statement ok
create table data (c1 int[]) as values
  ([1, 2, 3]),
  ([4, 5]),
  ([4, 5])

query error DataFusion error: Arrow error: Invalid argument error: Invalid comparison operation: List\(Field \{ name: "item", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) == List\(Field \{ name: "item", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
select * from data where c1 = [1, 2, 3];

Expect: [1,2,3]

query error DataFusion error: Arrow error: Invalid argument error: Invalid comparison operation: List\(Field \{ name: "item", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) == List\(Field \{ name: "item", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
select * from data where c1 = [4, 5];

Expect: [4, 5]

query error DataFusion error: Arrow error: Invalid argument error: Invalid comparison operation: List\(Field \{ name: "item", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) == List\(Field \{ name: "item", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
select * from data where c1 = [1, 4];

Expect: 

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@jayzhan211 jayzhan211 added the enhancement New feature or request label Mar 29, 2024
@Weijun-H
Copy link
Member

I think it should be related to the compare_op function in arrow-rs

@Weijun-H
Copy link
Member

track #5572

@jayzhan211
Copy link
Contributor Author

jayzhan211 commented Mar 30, 2024

There are many issues blocked by apache/arrow-rs#5426. Maybe I should pick up that challenging task again 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants