-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 standalone AnalyzerRule
example that implements row level access control
#11089
Conversation
3ef7b8e
to
78d271f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @alamb -- I think this example clearly shows how to use the AnalyzerRule
and TreeNode
APIs. LGTM.
// | Andrew | 22 | Manager | | ||
// | Chunchun | 44 | Manager | | ||
// +----------+-----+----------+ | ||
rule.set_show_position("Manager"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave me a lot of inspiration. It's exactly what a semantic engine will do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
AnalyzerRule
example that implements row level access control
Thank you for the review @jonahgao and @goldmedal |
…s control (apache#11089) * Add standlone example AnalyzerRule * Apply suggestions from code review Co-authored-by: Jax Liu <[email protected]> * update for api change * Apply suggestions from code review Co-authored-by: Jonah Gao <[email protected]> --------- Co-authored-by: Jax Liu <[email protected]> Co-authored-by: Jonah Gao <[email protected]>
…s control (apache#11089) * Add standlone example AnalyzerRule * Apply suggestions from code review Co-authored-by: Jax Liu <[email protected]> * update for api change * Apply suggestions from code review Co-authored-by: Jonah Gao <[email protected]> --------- Co-authored-by: Jax Liu <[email protected]> Co-authored-by: Jonah Gao <[email protected]>
Which issue does this PR close?
Closes #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:AnalyzerRule
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?
analyzer_rule.rs
that implements "row level access control". I was inspired by @goldmedal 's description of Wren's usecase in Add example for writing anAnalyzerRule
#10855 (comment) to pick the row level access control exampleAre these changes tested?
By CI
Are there any user-facing changes?