private static ExprNodeConstantDesc typeCast(ExprNodeDesc desc, TypeInfo ti) {
    return typeCast(desc, ti, false);
  }
Cast type from expression type to expected type ti.

@param desc constant expression
@param ti expected type info
@return cast constant, or null if the type cast failed.
ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConstantPropagateProcFactory.java