private FlinkRelBuilder.PlannerNamedWindowProperty convertToWindowProperty(Expression expression,
                                                                                   PlannerWindowReference windowReference) {
            Preconditions.checkArgument(expression instanceof CallExpression, "This should never happened");
            CallExpression aliasExpr = (CallExpression) expression;
            Preconditions.checkArgument(
                    BuiltInFunctionDefinitions.AS == aliasExpr.getFunctionDefinition(),
                    "This should never happened");
            String name = ((ValueLiteralExpression) aliasExpr.getChildren().get(1)).getValueAs(String.class)
                    .orElseThrow(
                            () -> new TableException("Invalid literal."));
            Expression windowPropertyExpr = aliasExpr.getChildren().get(0);
            Preconditions.checkArgument(windowPropertyExpr instanceof CallExpression, "This should never happened");
            CallExpression windowPropertyCallExpr = (CallExpression) windowPropertyExpr;
            FunctionDefinition fd = windowPropertyCallExpr.getFunctionDefinition();
            if (BuiltInFunctionDefinitions.WINDOW_START == fd) {
                return new FlinkRelBuilder.PlannerNamedWindowProperty(name, new PlannerWindowStart(windowReference));
            } else if (BuiltInFunctionDefinitions.WINDOW_END == fd) {
                return new FlinkRelBuilder.PlannerNamedWindowProperty(name, new PlannerWindowEnd(windowReference));
            } else if (BuiltInFunctionDefinitions.PROCTIME == fd) {
                return new FlinkRelBuilder.PlannerNamedWindowProperty(name, new PlannerProctimeAttribute(windowReference));
            } else if (BuiltInFunctionDefinitions.ROWTIME == fd) {
                return new FlinkRelBuilder.PlannerNamedWindowProperty(name, new PlannerRowtimeAttribute(windowReference));
            } else {
                throw new TableException("Invalid literal.");
            }
        }
Converter from Flink's specific relational representation: {@link QueryOperation} to Calcite's specific relational
representation: {@link RelNode}.
core/src/main/java/org/apache/flink/table/planner/plan/QueryOperationConverter.java