class AnyNeqOperator extends AnyOperator {

    public static String NAME = OPERATOR_PREFIX + ComparisonExpression.Type.NOT_EQUAL.getValue();

    AnyNeqOperator(Signature signature, BoundSignature boundSignature) {
        super(signature, boundSignature);
    }

    @Override
    boolean matches(Object probe, Object candidate) {
        return leftType.compare(probe, candidate) != 0;
    }

    @Override
    protected Query refMatchesAnyArrayLiteral(Function any, Reference probe, Literal<?> candidates, Context context) {
        //  col != ANY ([1,2,3]) --> not(col=1 and col=2 and col=3)
        String columnName = probe.storageIdent();
        MappedFieldType fieldType = context.getFieldTypeOrNull(columnName);
        if (fieldType == null) {
            return newUnmappedFieldQuery(columnName);
        }

        BooleanQuery.Builder andBuilder = new BooleanQuery.Builder();
        for (Object value : (Iterable<?>) candidates.value()) {
            if (value == null) {
                continue;
            }
            var fromPrimitive = EqOperator.fromPrimitive(
                probe.valueType(),
                columnName,
                value,
                probe.hasDocValues(),
                probe.indexType());
            if (fromPrimitive == null) {
                return null;
            }
            andBuilder.add(fromPrimitive, BooleanClause.Occur.MUST);
        }
        Query exists = IsNullPredicate.refExistsQuery(probe, context, false);
        return new BooleanQuery.Builder()
            .add(Queries.not(andBuilder.build()), Occur.MUST)
            .add(exists, Occur.FILTER)
            .build();
    }

    @Override
    @SuppressWarnings({"unchecked", "rawtypes"})
    protected Query literalMatchesAnyArrayRef(Function any, Literal<?> probe, Reference candidates, Context context) {<FILL_FUNCTION_BODY>}
}

        // 1 != any ( col ) -->  gt 1 or lt 1
        String columnName = candidates.storageIdent();

        MappedFieldType fieldType = context.getFieldTypeOrNull(columnName);
        if (fieldType == null) {
            return newUnmappedFieldQuery(columnName);
        }
        StorageSupport<?> storageSupport = probe.valueType().storageSupport();
        if (storageSupport == null) {
            return null;
        }
        EqQuery eqQuery = storageSupport.eqQuery();
        if (eqQuery == null) {
            return null;
        }
        Object value = probe.value();
        BooleanQuery.Builder query = new BooleanQuery.Builder();
        query.setMinimumNumberShouldMatch(1);
        var gt = eqQuery.rangeQuery(
            columnName,
            value,
            null,
            false,
            false,
            candidates.hasDocValues(),
            candidates.indexType() != IndexType.NONE);
        var lt = eqQuery.rangeQuery(
            columnName,
            null,
            value,
            false,
            false,
            candidates.hasDocValues(),
            candidates.indexType() != IndexType.NONE);
        if (lt == null || gt == null) {
            assert lt != null || gt == null : "If lt is null, gt must be null";
            return null;
        }
        query.add(gt, BooleanClause.Occur.SHOULD);
        query.add(lt, BooleanClause.Occur.SHOULD);
        return query.build();
    
<methods>public final transient java.lang.Boolean evaluate(io.crate.metadata.TransactionContext, io.crate.metadata.NodeContext, Input<java.lang.Object>[]) ,public static void register(io.crate.metadata.Functions.Builder) ,public Query toQuery(io.crate.expression.symbol.Function, io.crate.lucene.LuceneQueryBuilder.Context) <variables>permits AnyEqOperator,permits AnyLikeOperator,permits AnyNeqOperator,permits AnyNotLikeOperator,permits AnyRangeOperator,public static final List<java.lang.String> OPERATOR_NAMES,public static final java.lang.String OPERATOR_PREFIX,public static final Set<java.lang.String> SUPPORTED_COMPARISONS,protected final non-sealed DataType<java.lang.Object> leftType