You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "chenkovsky (via GitHub)" <gi...@apache.org> on 2025/05/19 13:38:28 UTC

[PR] feat: make error handling in indent explain consistent with that in tree [datafusion]

chenkovsky opened a new pull request, #16097:
URL: https://github.com/apache/datafusion/pull/16097

   ## Which issue does this PR close?
   
   
   ## Rationale for this change
   
   when logical optimization failed, explain format indent will return
   
   ```
   +-----------+------+
   | plan_type | plan |
   +-----------+------+
   +-----------+------+
   ```
   
   error message is swallowed.
   
   but for tree format, error will be thrown out.
   
   ## What changes are included in this PR?
   
   throw error if optimization failed for indent format.
   
   ## Are these changes tested?
   
   UT
   
   ## Are there any user-facing changes?
   
   No
   


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: make error handling in indent explain consistent with that in tree [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #16097:
URL: https://github.com/apache/datafusion/pull/16097#discussion_r2096013268


##########
datafusion/core/src/physical_planner.rs:
##########
@@ -1757,6 +1757,12 @@ impl DefaultPhysicalPlanner {
             )));
         }
 
+        if !e.logical_optimization_succeeded {
+            if let Some(plan) = e.stringified_plans.last() {

Review Comment:
   I think the original intent was to still show the explain plan even if there was an error 
   
   The idea was to show all the work that had happened so far (e.g. the plans) to help debugging
   
   I agree both explain modes should be consistent, but I suggest that instead of erroring with `EXPLAIN FORMAT INDENT` instead we capture and report the error in `EXPLAIN FORMAT TREE`



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: make error handling in indent explain consistent with that in tree [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #16097:
URL: https://github.com/apache/datafusion/pull/16097


-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: make error handling in indent explain consistent with that in tree [datafusion]

Posted by "chenkovsky (via GitHub)" <gi...@apache.org>.
chenkovsky commented on code in PR #16097:
URL: https://github.com/apache/datafusion/pull/16097#discussion_r2096658640


##########
datafusion/core/src/physical_planner.rs:
##########
@@ -1757,6 +1757,12 @@ impl DefaultPhysicalPlanner {
             )));
         }
 
+        if !e.logical_optimization_succeeded {
+            if let Some(plan) = e.stringified_plans.last() {

Review Comment:
   I modified implementation. If logical_optimization_succeeded is false. all stringified_plans will be returned.



-- 
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@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org