milenkovicm commented on PR #19267:
URL: https://github.com/apache/datafusion/pull/19267#issuecomment-3646751363
just rough idea,
this goes to encoder:
```rust
fn before_encode_expr(
&self,
_node: &Arc<dyn PhysicalExpr>,
) -> Result<Option<protobuf::PhysicalExprNode>> {
Ok(None)
}
```
I don't like use of `protobuf::PhysicalExprNode` there as method is not
similar to others in the traint
this part is `to_proto`:
```rust
pub fn serialize_physical_expr(
value: &Arc<dyn PhysicalExpr>,
codec: &dyn PhysicalExtensionCodec,
) -> Result<protobuf::PhysicalExprNode> {
match codec.before_encode_expr(value)? {
Some(p) => Ok(p),
None => serialize_physical_expr(value, codec),
}
}
```
maybe tree node like approach may make sense as well
--
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]