Skip to content

Commit 015b8ff

Browse files
committed
[fix][core] Optimize decorrelate
1 parent 5aeba76 commit 015b8ff

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -706,16 +706,6 @@ private static void shiftMapping(Map<Integer, Integer> mapping, int startIndex,
706706
public @Nullable Frame getInvoke(RelNode r, boolean isCorVarDefined, @Nullable RelNode parent) {
707707
final Frame frame = dispatcher.invoke(r, isCorVarDefined);
708708
currentRel = parent;
709-
if (frame != null && isCorVarDefined && r instanceof Sort) {
710-
final Sort sort = (Sort) r;
711-
// Can not decorrelate if the sort has per-correlate-key attributes like
712-
// offset or fetch limit, because these attributes scope would change to
713-
// global after decorrelation. They should take effect within the scope
714-
// of the correlation key actually.
715-
if (sort.offset != null || sort.fetch != null) {
716-
return null;
717-
}
718-
}
719709
if (frame != null) {
720710
map.put(r, frame);
721711
}

0 commit comments

Comments
 (0)