public Predicate convert(List<ScalarOperator> operators, DeltaLakeContext context) {
        DeltaLakeExprVisitor visitor = new DeltaLakeExprVisitor();
        List<Predicate> predicates = Lists.newArrayList();

        for (ScalarOperator operator : operators) {
            Predicate predicate = operator.accept(visitor, context);
            if (predicate != null) {
                predicates.add(predicate);
            }
        }

        Optional<Predicate> result = predicates.stream().reduce(And::new);
        return result.orElse(ALWAYS_TRUE);
    }
@Test
    public void testConvertConstType() {
        ScalarOperationToDeltaLakeExpr converter = new ScalarOperationToDeltaLakeExpr();
        ScalarOperationToDeltaLakeExpr.DeltaLakeContext context =
                new ScalarOperationToDeltaLakeExpr.DeltaLakeContext(schema, new HashSet<>());
        ScalarOperator operator;
        List<ScalarOperator> operators;
        Predicate convertExpr;
        Predicate expectedExpr;
        ConstantOperator value;

        // Boolean
        value = ConstantOperator.createBoolean(true);
        operator = new BinaryPredicateOperator(BinaryType.LT, cBoolCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaBoolCol, Literal.ofBoolean(true));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // Tinyint
        value = ConstantOperator.createTinyInt((byte) 5);
        operator = new BinaryPredicateOperator(BinaryType.LT, cShortCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaShortCol, Literal.ofShort((short) 5));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // Smallint
        value = ConstantOperator.createSmallInt((short) 5);
        operator = new BinaryPredicateOperator(BinaryType.LT, cShortCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaShortCol, Literal.ofShort((short) 5));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // int
        value = ConstantOperator.createInt(5);
        operator = new BinaryPredicateOperator(BinaryType.LT, cIntCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaIntCol, Literal.ofInt(5));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // bigint
        value = ConstantOperator.createBigint(5);
        operator = new BinaryPredicateOperator(BinaryType.LT, cLongCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaLongCol, Literal.ofLong(5));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // float
        value = ConstantOperator.createFloat(5.5);
        operator = new BinaryPredicateOperator(BinaryType.LT, cFloatCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaFloatCol, Literal.ofFloat((float) 5.5));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // double
        value = ConstantOperator.createDouble(5.5);
        operator = new BinaryPredicateOperator(BinaryType.LT, cDoubleCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaDoubleCol, Literal.ofFloat((float) 5.5));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // date
        LocalDateTime localDateTime = LocalDateTime.now();
        value = ConstantOperator.createDate(localDateTime);
        operator = new BinaryPredicateOperator(BinaryType.LT, cDateCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaDateCol, Literal.ofDate((int) localDateTime.toLocalDate().toEpochDay()));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // datetime (timestamp)
        localDateTime = LocalDateTime.now();
        value = ConstantOperator.createDatetime(localDateTime);
        operator = new BinaryPredicateOperator(BinaryType.LT, cTimestampCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        ZoneId zoneId = TimeUtils.getTimeZone().toZoneId();
        long timestamp = localDateTime.atZone(zoneId).toEpochSecond() * 1000 * 1000 + localDateTime.getNano() / 1000;
        expectedExpr = new Predicate("<", cDeltaTimestampCol, Literal.ofTimestamp(timestamp));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // datetime (timestamp_ntz)
        localDateTime = LocalDateTime.now();
        value = ConstantOperator.createDatetime(localDateTime);
        operator = new BinaryPredicateOperator(BinaryType.LT, cTimestampNTZCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        timestamp = localDateTime.atZone(ZoneOffset.UTC).toEpochSecond() * 1000 * 1000 + localDateTime.getNano() / 1000;
        expectedExpr = new Predicate("<", cDeltaTimestampNTZCol, Literal.ofTimestamp(timestamp));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // varchar
        value = ConstantOperator.createVarchar("12345");
        operator = new BinaryPredicateOperator(BinaryType.LT, cVarcharCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaVarcharCol, Literal.ofString("12345"));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // char
        value = ConstantOperator.createChar("12345");
        operator = new BinaryPredicateOperator(BinaryType.LT, cCharCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaCharCol, Literal.ofString("12345"));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());

        // hll
        value = ConstantOperator.createObject("12345", Type.HLL);
        operator = new BinaryPredicateOperator(BinaryType.LT, cHLLCol, value);
        operators = new ArrayList<>(List.of(operator));
        convertExpr = converter.convert(operators, context);
        expectedExpr = new Predicate("<", cDeltaHLLCol, Literal.ofString("12345"));
        Assert.assertEquals(convertExpr.toString(), expectedExpr.toString());
    }