You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/11/03 18:16:05 UTC
[GitHub] [arrow-datafusion] alamb commented on issue #1228: Extract logical plans in LogicalPlan as independent struct
alamb commented on issue #1228:
URL: https://github.com/apache/arrow-datafusion/issues/1228#issuecomment-959798288
> @alamb if I recall correctly, the partialOrd for Expr as added to help with unit testing right?
Yes, it was added in https://github.com/apache/arrow-datafusion/pull/1015
The test ordering I was the main usecase but I think there are some other ideas of being able to have Exprs in `BTreeSets` and other ordering based containers.
I think extracting `LogicalPlan` into structs would be fine, though it will be a very non trivial change (both for DataFusion and all users)
Something that is more of a hack but might be quicker to do would be to use a `NewType` kind of thing:
```rust
struct Subquery {
relation_name: String,
plan: Box<LogicalPlan>
}
```
And then implement `PartialOrd` directly on this structure (perhaps by using the point value of the Box directly).
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org