You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Repartition optimisation pass fails to account for order sensitive operations, which causes it to repartition a sorted partition. As there isn't (yet) an order preserving merge operator (#362) this results in an incorrect final physical plan.
This is incorrect, as the MergeExec does not preserve ordering and therefore the limit will return an arbitrary set of rows
Expected behavior
I would expect the Repartition pass to not introduce partitioning on paths with operators that are order sensitive. Potentially once there is an order preserving merge, this restriction could be relaxed provided the inserted merge is order preserving, but until then this optimisation is incorrect.
I will shortly be creating a ticket with some proposals on how we could make DataFusion sort order aware
Additional context
This issue was spawned out of investigation on #378 (comment)
The text was updated successfully, but these errors were encountered:
Describe the bug
The Repartition optimisation pass fails to account for order sensitive operations, which causes it to repartition a sorted partition. As there isn't (yet) an order preserving merge operator (#362) this results in an incorrect final physical plan.
To Reproduce
For example,
Results in
This is incorrect, as the MergeExec does not preserve ordering and therefore the limit will return an arbitrary set of rows
Expected behavior
I would expect the Repartition pass to not introduce partitioning on paths with operators that are order sensitive. Potentially once there is an order preserving merge, this restriction could be relaxed provided the inserted merge is order preserving, but until then this optimisation is incorrect.
I will shortly be creating a ticket with some proposals on how we could make DataFusion sort order aware
Additional context
This issue was spawned out of investigation on #378 (comment)
The text was updated successfully, but these errors were encountered: