mbwhite opened a new issue, #13645:
URL: https://github.com/apache/datafusion/issues/13645
### Describe the bug
The FieldReference in Substrait is defined with `root_type` being `oneof`
```
message FieldReference {
// Whether this reference has an origin of a root struct or is based on
the
// ouput of an expression. When this is a RootReference and
direct_reference
// above is used, the direct_reference must be of a type StructField.
oneof root_type {
Expression expression = 3;
RootReference root_reference = 4;
OuterReference outer_reference = 5;
}
```
A `RootReference` message is defined, that is empty but is used in most
cases I've seen.
The code [here]
(https://github.com/apache/datafusion/blob/fdb221fa645359b4bb65f600db1997ad6c865b65/datafusion/substrait/src/logical_plan/producer.rs#L2144)
sets this to `None`.
When this is serialized to a protobuf and read by other engines
(Substrait=Java in my case) this fails. with a
` Unhandled type: ROOTTYPE_NOT_SET`
### To Reproduce
Create a DataFusion plan, and then try and consume it within say
SubstraitJava
### Expected behavior
The protobuf should be valid and parse correctly
### Additional context
_No response_
--
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]