Examples of ToCharFunction


Examples of com.salesforce.phoenix.expression.function.ToCharFunction

            type = FunctionArgumentType.NUMERIC;
        }
        else {
            throw new SQLException(dataType + " type is unsupported for TO_CHAR().  Numeric and temporal types are supported.");
        }
        return new ToCharFunction(children, type, formatString, formatter);
    }
View Full Code Here

Examples of com.salesforce.phoenix.expression.function.ToCharFunction

    }
   
    @Test
    public void toChar() throws Exception {
        List<Expression> args = Lists.newArrayList(getInvertedLiteral(date(12, 11, 2001), PDataType.DATE));
        evaluateAndAssertResult(new ToCharFunction(args, FunctionArgumentType.TEMPORAL, "", DateUtil.getDateFormatter("MM/dd/yy hh:mm a")), "12/11/01 12:00 AM");
    }
View Full Code Here

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

    }
   
    @Test
    public void toChar() throws Exception {
        List<Expression> args = Lists.newArrayList(getInvertedLiteral(date(12, 11, 2001), PDataType.DATE));
        evaluateAndAssertResult(new ToCharFunction(args, FunctionArgumentType.TEMPORAL, "", DateUtil.getDateFormatter("MM/dd/yy hh:mm a")), "12/11/01 12:00 AM");
    }
View Full Code Here

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

            type = FunctionArgumentType.NUMERIC;
        }
        else {
            throw new SQLException(dataType + " type is unsupported for TO_CHAR().  Numeric and temporal types are supported.");
        }
        return new ToCharFunction(children, type, formatString, formatter);
    }
View Full Code Here

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

    }
   
    @Test
    public void toChar() throws Exception {
        List<Expression> args = Lists.newArrayList(getInvertedLiteral(date(12, 11, 2001), PDataType.DATE));
        evaluateAndAssertResult(new ToCharFunction(args, FunctionArgumentType.TEMPORAL, "", DateUtil.getDateFormatter("MM/dd/yy hh:mm a")), "12/11/01 12:00 AM");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.