westonpace commented on code in PR #14186:
URL: https://github.com/apache/arrow/pull/14186#discussion_r979290333
##########
cpp/src/arrow/engine/substrait/relation_internal.cc:
##########
@@ -541,6 +542,64 @@ Result<DeclarationInfo> FromProto(const substrait::Rel&
rel, const ExtensionSet&
std::move(aggregate_schema));
}
+ case substrait::Rel::RelTypeCase::kSet: {
+ const auto& set = rel.set();
+ RETURN_NOT_OK(CheckRelCommon(set));
+
+ if (set.inputs_size() < 2) {
+ return Status::Invalid(
+ "substrait::SetRel with inadequate number of input relations, ",
+ set.inputs_size());
+ }
+ substrait::SetRel_SetOp op = set.op();
+ // Note: at the moment Acero only supports UNION_ALL operation
+ switch (op) {
+ case substrait::SetRel::SET_OP_UNSPECIFIED:
+ return Status::NotImplemented(
+ "NotImplemented union type : ",
+ EnumToString(op, substrait::SetRel_SetOp_descriptor()));
Review Comment:
Thanks! Can we chain the case statements here? So instead of:
```
case 0:
return foo();
case 1:
return foo();
```
we can have:
```
case 0:
case 1:
return foo();
```
--
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]