vibhatha commented on code in PR #34050:
URL: https://github.com/apache/arrow/pull/34050#discussion_r1115749074
##########
cpp/src/arrow/engine/substrait/expression_internal.cc:
##########
@@ -320,6 +320,30 @@ Result<compute::Expression> FromProto(const
substrait::Expression& expr,
return function_converter(substrait_call);
}
+ case substrait::Expression::kCast: {
+ const auto& cast_exp = expr.cast();
+ ARROW_ASSIGN_OR_RAISE(auto input,
+ FromProto(cast_exp.input(), ext_set,
conversion_options));
+
+ // need to convert from the Substrait type spec to the relevant Arrow
thing
+ // do we need a switch/case or can we just get code similar to the below
FromProto?
Review Comment:
@westonpace this is a great analysis on the issue. The exact roundtrip was
sort of a recurring discussion when we started wrtiting the ToProtos for
relations. Can we guarantee the exactness in roundtripping? It is very tricky
when we have to make that choice. Should we put a set of rules where we ignore
the plans with this kind of inputs or we do not support exact roundtrip for
such cases. I am not sure whether this can be generalised. But my understanding
is roundtripping could be limited to such complex cases.
--
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]