anks!
> Julian
>
>
>
> From: Vladimir Ozerov
> Date: Tuesday, 11. January 2022 at 14:09
> To: dev@calcite.apache.org (dev@calcite.apache.org) <
> dev@calcite.apache.org>
> Subject: Re: Sort getting removed during optimization
> Hi Julian,
>
> When invoking the op
ke the left rel) and then the remaining
> entries from the right side (also ordered). But overall not ordered.
>
> Best
> Julian
>
> From: Stamatis Zampetakis
> Date: Tuesday, 11. January 2022 at 09:43
> To: dev@calcite.apache.org
> Subject: Re: Sort getting removed during opt
ke the left rel) and then the remaining
> entries from the right side (also ordered). But overall not ordered.
>
> Best
> Julian
>
> From: Stamatis Zampetakis
> Date: Tuesday, 11. January 2022 at 09:43
> To: dev@calcite.apache.org
> Subject: Re: Sort getting removed during optimization
.
Best
Julian
From: Stamatis Zampetakis
Date: Tuesday, 11. January 2022 at 09:43
To: dev@calcite.apache.org
Subject: Re: Sort getting removed during optimization
Hi Julian F,
Quite a naive question but did you get wrong results from the given plan? A
missing sort is not necessarily problematic
very much!
> Julian
>
> From: Julian Hyde
> Date: Tuesday, 11. January 2022 at 00:38
> To: dev@calcite.apache.org
> Subject: Re: Sort getting removed during optimization
> Is it possible that the Sort is being removed because some component knows
> that the input is al
a wrong Collation
or the SortRemoveRule investigating the input Collation wrong, or?
But nonetheless, thank you very much!
Julian
From: Julian Hyde
Date: Tuesday, 11. January 2022 at 00:38
To: dev@calcite.apache.org
Subject: Re: Sort getting removed during optimization
Is it possible
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
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.
Hi all,
I just observed a Plan transformation that I don’t quite understand.
The Logical Plan is:
LogicalSort(sort0=[$0], dir0=[DESC])
LogicalProject(time=[COALESCE($0, $2)], s1=[$1], s0=[$3])
LogicalJoin(condition=[=($0, $2)], joinType=[full])
LogicalTableScan(table=[[root,