Is it possible that the Sort is being removed because some component knows that the input is already sorted?
In particular, if a relation has at most one row, it is always sorted. Maybe the planner is deducing this via a some row-count metadata or uniqueness constraint. > On Jan 10, 2022, at 3:35 PM, xiong duan <[email protected]> wrote: > > If I understand correctly, If we remove the BINDABLE_SORT_RULE, the > result will throw an exception about the Plan transformation. So it looks > like a wrong rule's result. If you don't customize the rule, It is a bug, > and please test this using Calcite's new version.
