public ScalarOperator rewrite(ScalarOperator origin) {
        if (origin == null) {
            return null;
        }
        return origin.clone().accept(rewriter, null);
    }
@Test
    public void testRecursiveWithoutChildren() {
        Map<ColumnRefOperator, ScalarOperator> operatorMap = Maps.newHashMap();
        ColumnRefOperator columnRef1 = createColumnRef(1);
        ColumnRefOperator columnRef2 = createColumnRef(2);
        ColumnRefOperator columnRef3 = createColumnRef(3);
        operatorMap.put(columnRef1, columnRef2);
        operatorMap.put(columnRef2, columnRef3);

        ReplaceColumnRefRewriter rewriter = new ReplaceColumnRefRewriter(operatorMap, true);
        ColumnRefOperator source = createColumnRef(1);
        ScalarOperator target = rewriter.rewrite(source);
        Assert.assertTrue(target instanceof ColumnRefOperator);
        ColumnRefOperator rewritten = (ColumnRefOperator) target;
        Assert.assertEquals(3, rewritten.getId());
    }