presto-main/src/main/java/io/prestosql/sql/DynamicFilters.java/DynamicFilters/getDescriptor
class DynamicFilters:    public static Optional<Descriptor> getDescriptor(Metadata metadata, Expression expression)
    {
        if (!(expression instanceof FunctionCall)) {
            return Optional.empty();
        }

        FunctionCall functionCall = (FunctionCall) expression;
        boolean isDynamicFilterFunction = ResolvedFunction.fromQualifiedName(functionCall.getName())
                .map(ResolvedFunction::getSignature)
                .map(Signature::getName)
                .map(Function.NAME::equals)
                .orElse(false);
        if (!isDynamicFilterFunction) {
            return Optional.empty();
        }

        List<Expression> arguments = functionCall.getArguments();
        checkArgument(arguments.size() == 2, "invalid arguments count: %s", arguments.size());

        Expression firstArgument = arguments.get(0);
        checkArgument(firstArgument instanceof StringLiteral, "firstArgument is expected to be an instance of StringLiteral: %s", firstArgument.getClass().getSimpleName());
        String id = ((StringLiteral) firstArgument).getValue();
        return Optional.of(new Descriptor(id, arguments.get(1)));
    }