jiengup commented on code in PR #22582:
URL: https://github.com/apache/datafusion/pull/22582#discussion_r3330304112


##########
docs/source/library-user-guide/working-with-exprs.md:
##########
@@ -167,7 +167,7 @@ In DataFusion, an `OptimizerRule` is a trait that supports 
rewriting `Expr`s tha
 We'll call our rule `AddOneInliner` and implement the `OptimizerRule` trait. 
The `OptimizerRule` trait has two methods:
 
 - `name` - returns the name of the rule
-- `try_optimize` - takes a `LogicalPlan` and returns an `Option<LogicalPlan>`. 
If the rule is able to optimize the plan, it returns `Some(LogicalPlan)` with 
the optimized plan. If the rule is not able to optimize the plan, it returns 
`None`.
+- `rewrite` - takes a `LogicalPlan` and returns an `Transformed<LogicalPlan>`. 
If the rule is able to optimize the plan, it returns `Transformed::yes` with 
the optimized plan. If the rule is not able to optimize the plan, it returns 
`Transformed::no`.

Review Comment:
   Sure, thanks for your suggestion. I'll make it clearer here.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to