public static ScalarOperator convertPredicate(ScalarOperator predicate,
                                                  ExpressionRangePartitionInfoV2 exprRangePartitionInfo,
                                                  Map<ColumnId, Column> idToColumn) {
        // Currently only one partition column is supported
        if (exprRangePartitionInfo.getPartitionExprsSize() != 1) {
            return predicate;
        }
        Expr firstPartitionExpr = exprRangePartitionInfo.getPartitionExprs(idToColumn).get(0);
        Expr predicateExpr = firstPartitionExpr.clone();

        // only support binary predicate
        if (predicate instanceof BinaryPredicateOperator
                && predicate.getChild(0) instanceof ColumnRefOperator
                && predicate.getChild(1) instanceof ConstantOperator) {
            List<ScalarOperator> argument = predicate.getChildren();
            ColumnRefOperator columnRef = (ColumnRefOperator) argument.get(0);
            ConstantOperator constant = (ConstantOperator) argument.get(1);
            boolean success = rewritePredicate(predicateExpr, columnRef, constant);
            if (!success) {
                return predicate;
            }
            ScalarOperator translate = SqlToScalarOperatorTranslator.translate(predicateExpr);
            CallOperator callOperator = AnalyzerUtils.getCallOperator(translate);
            if (callOperator == null) {
                return predicate;
            }
            ScalarOperator evaluation = ScalarOperatorEvaluator.INSTANCE.evaluation(callOperator);
            if (!(evaluation instanceof ConstantOperator)) {
                return predicate;
            }
            predicate = predicate.clone();
            ConstantOperator result = (ConstantOperator) evaluation;
            Optional<ConstantOperator> castResult = result.castTo(predicateExpr.getType());

            if (!castResult.isPresent()) {
                return predicate;
            }
            result = castResult.get();
            predicate.setChild(1, result);
        }
        return predicate;
    }
@Test
    public void testConvertPredicate() {
        List<ScalarOperator> argument = Lists.newArrayList();
        ColumnRefOperator columnRefOperator = new ColumnRefOperator(1, Type.VARCHAR, "bill_code", false);
        ConstantOperator constantOperator = new ConstantOperator("JT2921712368984", Type.VARCHAR);
        argument.add(columnRefOperator);
        argument.add(constantOperator);
        ScalarOperator predicate = new BinaryPredicateOperator(BinaryType.EQ, argument);

        Table table = GlobalStateMgr.getCurrentState().getDb("test").getTable("bill_detail");
        ExpressionRangePartitionInfoV2 partitionInfo = (ExpressionRangePartitionInfoV2) ((OlapTable) table).getPartitionInfo();
        ScalarOperator afterConvert = ColumnFilterConverter.convertPredicate(predicate, partitionInfo, table.getIdToColumn());
        Assert.assertEquals(2921712368984L, ((ConstantOperator) afterConvert.getChild(1)).getValue());
    }