Skip to content

Change DataFrame.filter(predicates: Expr | str) #1273

Description

@milenkovicm

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

there is a bit of ceremony involved into creating filter statement

from datafusion import col, lit
df.filter(col("age") > lit(3))

Describe the solution you'd like

Add support for string expressions, something like

df.filter("age > 3").show()

which would simplify filter creation, but keep support for original way to create expression parameter

Describe alternatives you've considered

Expose DataFrame.parse_sql_expr(e) and use it as needed. Or it could be exposed as well as there could be quite few places it would be useful.

Additional context

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions