Skip to content

Commit

Permalink
[Substrait] Fix error handling in export of field_reference. (#857)
Browse files Browse the repository at this point in the history
This PR fixes the error handling in the export logic of
`field_reference`, which did not forward errors from importing the input
expression of that op.

Signed-off-by: Ingo Müller <ingomueller@google.com>
  • Loading branch information
ingomueller-net authored Jul 22, 2024
1 parent c09cb29 commit b705bd5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Target/SubstraitPB/Export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ FailureOr<std::unique_ptr<Expression>> exportOperation(FieldReferenceOp op) {
"Substrait expression");

FailureOr<std::unique_ptr<Expression>> expression = exportOperation(exprOp);
if (failed(expression))
return failure();

fieldReference->set_allocated_expression(expression->release());
} else {
// Input must be a `BlockArgument`. Only support root references for now.
Expand Down

0 comments on commit b705bd5

Please sign in to comment.