镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[R] "Error: Filter expression not supported for Arrow Datasets" using "date" expression rigth hand side of a filter #39688

Closed

Description

@jpramil

Describe the bug, including details regarding any error messages, version, and platform.

Hello,

Here is a repex of a bug occuring when I try to filter a dataset like "filter(Date == date).
Maybe the expression "date" has a special interpretation ?

Thx,

library(arrow)
library(dplyr)
library(lubridate)

# Create a simple df
set.seed(123)
Date <- rep(c("2022-01-01", "2022-01-02"), each = 5)
Volume <- sample(100:200, 10, replace = TRUE)

df <- tibble(
  Date = Date,
  Volume = Volume
)

# save as partitioned parquet
temp_dir <- tempdir()
write_dataset(df, temp_dir,  partitioning =  "Date")

# Lazy import
reimported_data <- open_dataset(temp_dir)

# Bug 
date = "2022-01-02"
reimported_data |> filter(Date == date)

# Possible workaround
my_date = "2022-01-02"
reimported_data |> filter(Date == my_date)




Component(s)

Parquet, R

Activity

  1. changed the title [-]"Error: Filter expression not supported for Arrow Datasets" using "date" expression rigth hand side of a filter[/-] [+][R] "Error: Filter expression not supported for Arrow Datasets" using "date" expression rigth hand side of a filter[/+] on Jan 18, 2024
  2. thisisnic commented on Jan 30, 2024

    @thisisnic
    Member

    Thanks for reporting this @jpramil! I can confirm that I can replicate it and it is a bug. I think we'll need to update something around the environment in which we look for the value we are comparing against.

  3. mohdbilal87 commented on Mar 5, 2024

    @mohdbilal87

    Confirming the above behavior. For me it was

    ds <- arrow::open_dataset(
      sources = "source_folder", 
      format = "parquet", 
      partitioning = c("month", "day")
    )
    
    dplyr::collect(
            x = dplyr::filter(
              .data = ds, month == mon, day == day
            )
          )
    

    This kept segfaulting. I suspect, as noted above, this is due to day == day. day == d works as expected.

  4. added a commit that references this issue on Sep 23, 2026
  5. added this to the 26.0.0 milestone on Sep 23, 2026
  6. thisisnic commented on Sep 23, 2026

    @thisisnic
    Member

    Issue resolved by pull request 51291
    #51291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions