Package org.apache.phoenix.expression.function

Examples of org.apache.phoenix.expression.function.RoundFunction


        // TODO: confirm that this is a valid optimization
        String query = "select count(1) from atable group by a_date having round(a_date,'hour') > ?";
        Date date = new Date(System.currentTimeMillis());
        List<Object> binds = Arrays.<Object>asList(date);
        Expressions expressions = compileStatement(query,binds);
        Expression w = constantComparison(CompareOp.GREATER, new RoundFunction(Arrays.asList(kvColumn(BaseConnectionlessQueryTest.A_DATE),LiteralExpression.newConstant("hour"),LiteralExpression.newConstant(1))), date);
        assertEquals(w, expressions.whereClause);
        assertNull(expressions.havingClause);
    }
View Full Code Here

TOP

Related Classes of org.apache.phoenix.expression.function.RoundFunction

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.