presto-main/src/main/java/io/prestosql/sql/analyzer/WindowFunctionValidator.java/WindowFunctionValidator/visitFunctionCall
class WindowFunctionValidator:    @Override
    protected Void visitFunctionCall(FunctionCall functionCall, Analysis analysis)
    {
        requireNonNull(analysis, "analysis is null");

        ResolvedFunction resolvedFunction = analysis.getResolvedFunction(functionCall);
        if (resolvedFunction != null && !functionCall.getWindow().isPresent() && metadata.getFunctionMetadata(resolvedFunction).getKind() == WINDOW) {
            throw semanticException(MISSING_OVER, functionCall, "Window function %s requires an OVER clause", resolvedFunction.getSignature().getName());
        }
        return super.visitFunctionCall(functionCall, analysis);
    }