Uh oh!
There was an error while loading. Please reload this page.
Change error type of invalid argument to PlanError rather than InternalError, remove misleading comments - #7355
Conversation
| _ => { | ||
| // this error is internal as `data_types` should have captured this. | ||
| return internal_err!( | ||
| return plan_err!( |
There was a problem hiding this comment.
it is true that this is currently caught by higher up type checks, but I think it is better to throw a plan error here to tell users about the problem if something changes rather than throw a confusing internal error
Also given that this code is often copy/pasted it probably should default to returning a nice error message rather than an opaque one
alamb
commented
Aug 22, 2023
Thank you @DDtKey ! |
alamb
commented
Aug 23, 2023
@jackwener / @liukun4515 / @Dandandan -- here is an example of a PR that has been reviewed by contributors but that I can't merge due to the restriction put in place by #7226 ![]() What is the reason we want to require an approval from one of the committers prior to merging? |
alamb
commented
Aug 23, 2023
Thank you @Dandandan |

Which issue does this PR close?
related to #6108 and #7326
related to #7339
Rationale for this change
Inspired by @Weijun-H 's change in #7339 I was trying to clean up a comment I saw left over from #7339 I realized that not only are the comments in the rest of this file misleading the same bug also applied to several other functions.
Specifically, despite the comment claims that "this should have been covered earlier" it is clearly not and some of these error paths are directly user visible due to invalid queries (and thus should be plan errors, not internal errors). For example
What changes are included in this PR?
Are these changes tested?
Yes
Are there any user-facing changes?
yes, better error messages