datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Add standlone example AnalyzerRule that implements row level access control

Open alamb opened this issue 1 year ago • 0 comments

Which issue does this PR close?

Closes https://github.com/apache/datafusion/issues/10855

Rationale for this change

It is common to use DataFusion to analyze / modify queries, so it would be good to have some more full featured examples of doing so.

Additionally, the current rewrite_expr.rs example has three distinct examples:

  1. Using DataFusion LogicalPlanning without execution
  2. Implementing an AnalyzerRule
  3. Implementing an OptimizerRule

Each I think should be its own example to make them easier to find and more full featured

What changes are included in this PR?

  1. Add example analyzer_rule.rs that implements "row level access control". I was inspired by @goldmedal 's description of Wren's usecase in https://github.com/apache/datafusion/issues/10855#issuecomment-2171124147 to pick the row level access control example

Are these changes tested?

By CI

Are there any user-facing changes?

alamb avatar Jun 23 '24 20:06 alamb