Package org.voltdb.expressions

Examples of org.voltdb.expressions.NullValueExpression


        AbstractExpression clone = AbstractExpression.fromJSONObject(new JSONObject(json), catalog_db);
        assertNotNull(clone);
        assert(ExpressionUtil.equals(exp, clone));

        // Change one of the branches. This should now return false!
        clone.setRight(new NullValueExpression());
        assertFalse(ExpressionUtil.equals(exp, clone));
       
        // Remove both the branch on both sids. This should return true!
        exp.setRight(null);
        clone.setRight(null);
View Full Code Here


    private final PlannerContext context = PlannerContext.singleton();
   
    @Test
    public void testDuplicateColumns() {
        AbstractExpression expression = new NullValueExpression();
        String columnName = "TABLEA.A_ID";
        SortOrder sortOrder = SortOrder.kUnsorted;
        Storage storage = Storage.kTemporary;
       
        PlanColumn col0 = context.getPlanColumn(expression, columnName, sortOrder, storage);
        assertNotNull(col0);
//        System.err.println(col0 + " ==> " + col0.hashCode());
       
        PlanColumn col1 = context.getPlanColumn(expression, columnName, sortOrder, storage);
        assertNotNull(col1);
//        System.err.println(col1 + " ==> " + col1.hashCode());
        assertEquals(col0.hashCode(), col1.hashCode());
        assertEquals(col0.getDisplayName(), col1.getDisplayName());
        assertEquals(col0.getSortOrder(), col1.getSortOrder());
        assertEquals(col0.getStorage(), col1.getStorage());
        assert(ExpressionUtil.equals(col0.getExpression(), col1.getExpression()));
        assertEquals(col0, col1);
       
        expression.setLeft(new NullValueExpression());
        PlanColumn col2 = context.getPlanColumn(expression, columnName, sortOrder, storage);
        assertNotNull(col2);
//        System.err.println(col2 + " ==> " + col2.hashCode());
        assertNotSame(col0.hashCode(), col2.hashCode());
        assertEquals(col0.getDisplayName(), col2.getDisplayName());
View Full Code Here

TOP

Related Classes of org.voltdb.expressions.NullValueExpression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.