public ScalarOperator rewrite(ScalarOperator root, List<ScalarOperatorRewriteRule> ruleList) {
        ScalarOperator result = root;

        context.reset();
        int changeNums;
        do {
            changeNums = context.changeNum();
            for (ScalarOperatorRewriteRule rule : ruleList) {
                result = rewriteByRule(result, rule);
            }

            if (changeNums > Config.max_planner_scalar_rewrite_num) {
                throw new StarRocksPlannerException("Planner rewrite scalar operator over limit",
                        ErrorType.INTERNAL_ERROR);
            }
        } while (changeNums != context.changeNum());

        return result;
    }
@Test
    public void testNormalizeIsNull() {
        ColumnRefOperator column1 = new ColumnRefOperator(0, Type.INT, "test0", false);
        IsNullPredicateOperator isnotNull = new IsNullPredicateOperator(true, column1);
        ScalarOperator rewritten = new ScalarOperatorRewriter()
                .rewrite(isnotNull, ScalarOperatorRewriter.MV_SCALAR_REWRITE_RULES);
        Assert.assertEquals(ConstantOperator.TRUE, rewritten);

        ScalarOperator rewritten2 = new ScalarOperatorRewriter()
                .rewrite(isnotNull, ScalarOperatorRewriter.DEFAULT_REWRITE_SCAN_PREDICATE_RULES);
        Assert.assertEquals(ConstantOperator.TRUE, rewritten2);
    }