Skip to content

Support filter for ARRAY #9857

Closed
Closed

Description

@jayzhan211

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

Activity

  1. Weijun-H commented on Mar 30, 2024

    @Weijun-H
    Member

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

  2. Weijun-H commented on Mar 30, 2024

    @Weijun-H
    Member

    track #5572

  3. jayzhan211 commented on Mar 30, 2024

    @jayzhan211
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions