Skip to content

Does DataFusion Support JSON Path Filtering Like jsonb_path_exists in PostgreSQL? #15264

Answered by alamb
dadepo asked this question in Q&A
Discussion options

You must be logged in to vote

You could create a function called jsonb_path_exists that takes a binary column and a json path string perhaps?

You could take a look at how it is done https://github.com/datafusion-contrib/datafusion-functions-json

There is a lower level API that lets you customize how expressions are planned, here: https://docs.rs/datafusion/latest/datafusion/logical_expr/planner/trait.ExprPlanner.html

You can register them via
https://docs.rs/datafusion/latest/datafusion/execution/trait.FunctionRegistry.html#method.register_expr_planner

Though I don't think we have a good example of using them yet,..

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@alamb
Comment options

alamb Mar 17, 2025
Collaborator

@alamb
Comment options

alamb Mar 17, 2025
Collaborator

@dadepo
Comment options

@alamb
Comment options

alamb Mar 18, 2025
Collaborator

Answer selected by dadepo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants