Skip to content

Commit 73ebfcc

Browse files
authored
docs: fix some comments on query_planning example (#21783)
Hi! I open this small PR with some fixes I found while reading through the examples. I haven't created an issue as these are tiny changes. Thanks for your time! ## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> No related issue ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> I found some small mistakes on comments on the query_planning example ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> Small comment corrections ## Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> No need ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> No
1 parent eca2e00 commit 73ebfcc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

datafusion-examples/examples/query_planning/expr_api.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ fn simplify_demo() -> Result<()> {
201201

202202
// basic arithmetic simplification
203203
// i + 1 + 2 => i + 3
204-
// (note this is not done if the expr is (col("i") + (lit(1) + lit(2))))
204+
// (note this is not done if the expr is (col("i") + lit(1) + lit(2)))
205205
assert_eq!(
206206
simplifier.simplify(col("i") + (lit(1) + lit(2)))?,
207207
col("i") + lit(3)
@@ -263,7 +263,7 @@ fn range_analysis_demo() -> Result<()> {
263263
// You can provide DataFusion any known boundaries on the values of `date`
264264
// (for example, maybe you know you only have data up to `2020-09-15`), but
265265
// in this case, let's say we don't know any boundaries beforehand so we use
266-
// `try_new_unknown`
266+
// `try_new_unbounded`
267267
let boundaries = ExprBoundaries::try_new_unbounded(&schema)?;
268268

269269
// Now, we invoke the analysis code to perform the range analysis

0 commit comments

Comments
 (0)