Jefffrey commented on issue #4766:
URL: 
https://github.com/apache/arrow-datafusion/issues/4766#issuecomment-1370805961

   I've got an initial working version for physical planner errors: 
https://github.com/apache/arrow-datafusion/pull/4819
   
   Gist is handling the results error cases to ensure these are appended to the 
stringified plans, instead of simply returning early, which required some 
modifications to the observer pattern, since need observer to not only run for 
successes, but errors as well to capture these:
   
   
https://github.com/apache/arrow-datafusion/blob/cdd21be7a1c987958e0a9dff5c498080c6277e66/datafusion/core/src/physical_plan/planner.rs#L1744-L1749
 
   
   Alternative would be for optimize_internal() to return which plan_type 
failed as part of the error, if don't want to modify the observer in this way.
   
   But if want to do for logical plan too (if it makes sense to?), this seems 
to become much tricker. Could attempt something similar as I did for physical, 
applying here:
   
   
https://github.com/apache/arrow-datafusion/blob/5b70e3543f5c10832e43ed25e7d4166cf0c1df78/datafusion/core/src/execution/context.rs#L1650-L1658
   
   But the observer pattern would require extensive changes too it seems, to 
account for calling it for error cases too (this might be too big a change?). 
Could attempt to go with alternative described above, where error returns the 
plan type.
   
   Any thoughts on the logical plan part @HaoYang670 ?


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