Skip to content
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

Examples: boundary analysis example for AND/OR conjunctions #14735

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

clflushopt
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

The goal of this change is to supplement the example in #14688 with a more useful example that demonstrates the current state of boundary analysis for AND conjunctions; we also explain and show that OR conjunctions are not currently supported.

What changes are included in this PR?

In datafusion-examples/examples/expr_api.rs there is now a new function that explains data flow during boundary analysis and selectivity calculation for the expression age > 18 and <= 25 with some comments to explain what
the logic under the hood does.

In a separate commit, we are also adding a brief explainer of the boundary analysis framework to the Query Optimizer section in the library guide. The goal is to have some supporting documentation that collects, summaries and distills
the information currently documented in the different pull requests and the original design doc (see #3929).

Are these changes tested?

The change re-uses parts of the API that are already covered by existing tests.

Are there any user-facing changes?

Yes, this introduces a new example.

@clflushopt clflushopt changed the title feat(examples): boundary analysis example for the case of conjunctions Examples: boundary analysis example for AND/OR conjunctions Feb 18, 2025
This change adds a short section in the Query Optimizer page of the
library guide that gives a brief overview of boundary analysis and
cardinality estimation and their role during query optimization.
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 19, 2025
@clflushopt
Copy link
Contributor Author

@alamb @berkaysynnada this is the follow up for #14688

@alamb
Copy link
Contributor

alamb commented Feb 20, 2025

Thanks @clflushopt -- I will review this one over the next few days hopefully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants