You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/22 08:52:53 UTC

[GitHub] [arrow-datafusion] doki23 commented on a change in pull request #2054: add some pre-check for LogicalPlanBuilder(WIP)

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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org