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

Add filter for list columns #10

Merged
merged 5 commits into from
May 12, 2023
Merged

Add filter for list columns #10

merged 5 commits into from
May 12, 2023

Conversation

vincev
Copy link
Owner

@vincev vincev commented May 12, 2023

Add support for filtering on list column values:

$ dply -c 'parquet("lists.parquet") |
    filter(list_contains(tags, "ag9")) |
    head(5)'
shape: (5, 4)
┌──────────┬───────────────┬───────────────────┬────────────────────────────┐
│ shape_id ┆ ints          ┆ floats            ┆ tags                       │
│ ---      ┆ ---           ┆ ---               ┆ ---                        │
│ u32      ┆ list[u32]     ┆ list[f64]         ┆ list[str]                  │
╞══════════╪═══════════════╪═══════════════════╪════════════════════════════╡
│ 2        ┆ [73]          ┆ [3.5, 15.0, 23.0] ┆ ["tag9"]                   │
│ 10       ┆ [6]           ┆ [2.5, 3.5, … 5.0] ┆ ["tag1", "tag3", … "tag9"] │
│ 13       ┆ [9, 23, … 92] ┆ null              ┆ ["tag1", "tag5", … "tag9"] │
│ 20       ┆ [4]           ┆ null              ┆ ["tag1", "tag5", "tag9"]   │
│ 22       ┆ [52, 96]      ┆ [6.0]             ┆ ["tag4", "tag6", "tag9"]   │
└──────────┴───────────────┴───────────────────┴────────────────────────────┘

@vincev vincev merged commit 22c3b41 into main May 12, 2023
@vincev vincev deleted the list-contains branch May 12, 2023 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant