alamb commented on a change in pull request #1566:
URL: https://github.com/apache/arrow-datafusion/pull/1566#discussion_r787050608
##########
File path: datafusion/src/logical_plan/plan.rs
##########
@@ -214,8 +220,14 @@ pub struct Extension {
pub node: Arc<dyn UserDefinedLogicalNode + Send + Sync>,
}
+impl PartialEq for Extension {
+ fn eq(&self, _other: &Self) -> bool {
+ todo!()
Review comment:
If you leave `todo!()` here it means the code will assert for plans with
`UserDefinedPlanNode`s and cross joins (which is likely not possible given the
inputs are from the `FROM` list, and thus shoudl be `Select` (for subqueries)
or `TableScan` for table references
For the future, I think you can change
```rust
#[derive(Clone)]
pub struct Extension {
/// The runtime extension operator
pub node: Arc<dyn UserDefinedLogicalNode + PartialEq Send + Sync>,
}
```
to the following (aka force the `UserDefinedLogicalNode` to implement
`PartialEq`):
```rust
#[derive(Clone, PartialEq)]
pub struct Extension {
/// The runtime extension operator
pub node: Arc<dyn UserDefinedLogicalNode + PartialEq Send + Sync>,
}
```
--
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]