doki23 commented on a change in pull request #2054:
URL: https://github.com/apache/arrow-datafusion/pull/2054#discussion_r831912068



##########
File path: datafusion/src/logical_plan/builder.rs
##########
@@ -916,7 +916,11 @@ impl LogicalPlanBuilder {
 
     /// Build the plan
     pub fn build(&self) -> Result<LogicalPlan> {
-        Ok(self.plan.clone())
+        if let Some(err) = check_plan_invalid(&self.plan) {

Review comment:
       You mean Result<LogicalPlan, DataFusionError>? 
   Hm, this check function just finds the err, if it returns Ok(plan), it's a 
little bit strange🤔.
   Another reason is we must write **return root_plan.clone()** in each arm of 
the match if use Result.
   If you mean Result<(), DataFusionError>, I think it's the same as Option, 
right?
   Or if I fail to get your idea?
   




-- 
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]


Reply via email to