jnh5y commented on code in PR #23713: URL: https://github.com/apache/flink/pull/23713#discussion_r1392984223
########## flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/expressions/converter/OverConvertRule.java: ########## @@ -182,57 +191,59 @@ private RexNode createCollation( } private RexWindowBound createBound(ConvertContext context, Expression bound, SqlKind sqlKind) { - if (bound instanceof CallExpression) { - CallExpression callExpr = (CallExpression) bound; - FunctionDefinition func = callExpr.getFunctionDefinition(); - if (BuiltInFunctionDefinitions.UNBOUNDED_ROW.equals(func) - || BuiltInFunctionDefinitions.UNBOUNDED_RANGE.equals(func)) { + if (bound instanceof ValueLiteralExpression) { + final ValueLiteralExpression literal = (ValueLiteralExpression) bound; + return literal.getValueAs(OverWindowRange.class) + .map(r -> createSymbolBound(r, sqlKind)) + .orElseGet( + () -> + createLiteralBound( + context, (ValueLiteralExpression) bound, sqlKind)); + } else { + throw new TableException("Unexpected expression: " + bound); Review Comment: Have we tested this case? (I'm asking to get an idea how this is called.) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org