class CmpOperator extends Operator<Object> {

    private final IntPredicate isMatch;
    private final DataType<Object> type;

    @SuppressWarnings("unchecked")
    public CmpOperator(Signature signature, BoundSignature boundSignature, IntPredicate cmpResultIsMatch) {
        super(signature, boundSignature);
        this.type = (DataType<Object>) boundSignature.argTypes().get(0);
        this.isMatch = cmpResultIsMatch;
    }

    @Override
    @SafeVarargs
    public final Boolean evaluate(TransactionContext txnCtx, NodeContext nodeCtx, Input<Object>... args) {<FILL_FUNCTION_BODY>}

    @SuppressWarnings({"rawtypes", "unchecked"})
    public static Query toQuery(String functionName, Reference ref, Object value) {
        StorageSupport<?> storageSupport = ref.valueType().storageSupport();
        if (storageSupport == null) {
            return null;
        }
        EqQuery eqQuery = storageSupport.eqQuery();
        if (eqQuery == null) {
            return new MatchNoDocsQuery("For types that do not support EqQuery, a `x [>, >=, <, <=] <value>` is always considered a no-match");
        }
        String field = ref.storageIdent();
        return switch (functionName) {
            case GtOperator.NAME -> eqQuery.rangeQuery(
                field,
                value,
                null,
                false,
                false,
                ref.hasDocValues(),
                ref.indexType() != IndexType.NONE);
            case GteOperator.NAME -> eqQuery.rangeQuery(
                field,
                value,
                null,
                true,
                false,
                ref.hasDocValues(),
                ref.indexType() != IndexType.NONE);
            case LtOperator.NAME -> eqQuery.rangeQuery(
                field,
                null,
                value,
                false,
                false,
                ref.hasDocValues(),
                ref.indexType() != IndexType.NONE);
            case LteOperator.NAME -> eqQuery.rangeQuery(
                field,
                null,
                value,
                false,
                true,
                ref.hasDocValues(),
                ref.indexType() != IndexType.NONE);
            default -> throw new IllegalArgumentException(functionName + " is not a supported comparison operator");
        };
    }

    @Override
    public Query toQuery(Reference ref, Literal<?> literal) {
        return CmpOperator.toQuery(signature.getName().name(), ref, literal.value());
    }
}

        assert args != null : "args must not be null";
        assert args.length == 2 : "number of args must be 2";
        assert args[0] != null && args[1] != null : "1st and 2nd argument must not be null";

        Object left = args[0].value();
        Object right = args[1].value();
        if (left == null || right == null) {
            return null;
        }

        assert (left.getClass().equals(right.getClass())) : "left and right must have the same type for comparison";

        return isMatch.test(type.compare(left, right));
    
<methods>public io.crate.expression.symbol.Symbol normalizeSymbol(io.crate.expression.symbol.Function, io.crate.metadata.TransactionContext, io.crate.metadata.NodeContext) <variables>public static final java.lang.String PREFIX,public static final io.crate.types.BooleanType RETURN_TYPE