private LogicalWindow toLogicalWindow(ResolvedGroupWindow window) {
            DataType windowType = window.getTimeAttribute().getOutputDataType();
            PlannerWindowReference windowReference = new PlannerWindowReference(window.getAlias(),
                    new Some<>(fromDataToLogicalType(windowType)));
            switch (window.getType()) {
                case SLIDE:
                    return new SlidingGroupWindow(
                            windowReference,
                            window.getTimeAttribute(),
                            window.getSize().orElseThrow(() -> new TableException("missed size parameters!")),
                            window.getSlide().orElseThrow(() -> new TableException("missed slide parameters!"))
                    );
                case SESSION:
                    return new SessionGroupWindow(
                            windowReference,
                            window.getTimeAttribute(),
                            window.getGap().orElseThrow(() -> new TableException("missed gap parameters!"))
                    );
                case TUMBLE:
                    return new TumblingGroupWindow(
                            windowReference,
                            window.getTimeAttribute(),
                            window.getSize().orElseThrow(() -> new TableException("missed size parameters!"))
                    );
                default:
                    throw new TableException("Unknown window type");
            }
        }
Get the {@link AggCall} correspond to the aggregate or table aggregate expression.
core/src/main/java/org/apache/flink/table/planner/plan/QueryOperationConverter.java