2010YOUY01 commented on code in PR #18790:
URL: https://github.com/apache/datafusion/pull/18790#discussion_r2536223678
##########
datafusion/proto/src/logical_plan/mod.rs:
##########
@@ -776,11 +776,10 @@ impl AsLogicalPlan for LogicalPlanNode {
builder.build()
}
LogicalPlanType::Union(union) => {
- if union.inputs.len() < 2 {
- return internal_err!(
- "Protobuf deserialization error, Union was require at
least two input."
- );
- }
+ assert_or_internal_err!(
+ union.inputs.len() >= 2,
+ "Protobuf deserialization error, Union was require at
least two input."
+ );
Review Comment:
It depends I think. For SQL/Dataframe APIs, this should be an internal
error, however for low level rust APIs, technically you can construct such plan
and make it an execution error. So I slightly prefer to leave it as is.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]