/** * @return true if type is numeric */ public static boolean isNumeric(RelDataType type) { return isExactNumeric(type) || isApproximateNumeric(type); }
/** * @return true if type is numeric */ public static boolean isNumeric(RelDataType type) { return isExactNumeric(type) || isApproximateNumeric(type); }
/** * @return true if type is numeric */ public static boolean isNumeric(RelDataType type) { return isExactNumeric(type) || isApproximateNumeric(type); }
/** * Returns the type for a histogram function. It is either the actual * type or an an approximation to it. */ private RelDataType computeHistogramType(RelDataType type) { if (SqlTypeUtil.isExactNumeric(type) && type.getSqlTypeName() != SqlTypeName.BIGINT) { return typeFactory.createSqlType(SqlTypeName.BIGINT); } else if (SqlTypeUtil.isApproximateNumeric(type) && type.getSqlTypeName() != SqlTypeName.DOUBLE) { return typeFactory.createSqlType(SqlTypeName.DOUBLE); } else { return type; } } }
&& SqlTypeUtil.isNumeric(typeB); if (SqlTypeUtil.isApproximateNumeric(typeA) || SqlTypeUtil.isApproximateNumeric(typeB)) { List<RexNode> newOperands; if (SqlTypeUtil.isApproximateNumeric(typeA)) { newOperands = ImmutableList.of( operands.get(0),
/** * Returns the type for a histogram function. It is either the actual * type or an an approximation to it. */ private RelDataType computeHistogramType(RelDataType type) { if (SqlTypeUtil.isExactNumeric(type) && type.getSqlTypeName() != SqlTypeName.BIGINT) { return typeFactory.createSqlType(SqlTypeName.BIGINT); } else if (SqlTypeUtil.isApproximateNumeric(type) && type.getSqlTypeName() != SqlTypeName.DOUBLE) { return typeFactory.createSqlType(SqlTypeName.DOUBLE); } else { return type; } } }
/** * Returns the type for a histogram function. It is either the actual * type or an an approximation to it. */ private RelDataType computeHistogramType(RelDataType type) { if (SqlTypeUtil.isExactNumeric(type) && type.getSqlTypeName() != SqlTypeName.BIGINT) { return typeFactory.createSqlType(SqlTypeName.BIGINT); } else if (SqlTypeUtil.isApproximateNumeric(type) && type.getSqlTypeName() != SqlTypeName.DOUBLE) { return typeFactory.createSqlType(SqlTypeName.DOUBLE); } else { return type; } } }
&& SqlTypeUtil.isNumeric(typeB); if (SqlTypeUtil.isApproximateNumeric(typeA) || SqlTypeUtil.isApproximateNumeric(typeB)) { List<RexNode> newOperands; if (SqlTypeUtil.isApproximateNumeric(typeA)) { newOperands = ImmutableList.of( operands.get(0),
/** * Returns the type for a histogram function. It is either the actual * type or an an approximation to it. */ private RelDataType computeHistogramType(RelDataType type) { if (SqlTypeUtil.isExactNumeric(type) && type.getSqlTypeName() != SqlTypeName.BIGINT) { return typeFactory.createSqlType(SqlTypeName.BIGINT); } else if (SqlTypeUtil.isApproximateNumeric(type) && type.getSqlTypeName() != SqlTypeName.DOUBLE) { return typeFactory.createSqlType(SqlTypeName.DOUBLE); } else { return type; } } }
if (SqlTypeUtil.isApproximateNumeric(value.getType())) { return makeMultiply( value,
if (SqlTypeUtil.isApproximateNumeric(value.getType())) { return makeMultiply( value,
} else if (SqlTypeUtil.isApproximateNumeric(resultType)) { return null; } else if (SqlTypeUtil.isApproximateNumeric(type)) { if (SqlTypeUtil.isApproximateNumeric(resultType)) { if (type.getPrecision() > resultType.getPrecision()) { resultType = type;
} else if (SqlTypeUtil.isApproximateNumeric(resultType)) { return null; } else if (SqlTypeUtil.isApproximateNumeric(type)) { if (SqlTypeUtil.isApproximateNumeric(resultType)) { if (type.getPrecision() > resultType.getPrecision()) { resultType = type;
fromType.getScale()), false); } else if (SqlTypeUtil.isApproximateNumeric(toType)) { fromType.getScale()), false); } else if (SqlTypeUtil.isApproximateNumeric(fromType)) {
fromType.getScale()), false); } else if (SqlTypeUtil.isApproximateNumeric(toType)) { fromType.getScale()), false); } else if (SqlTypeUtil.isApproximateNumeric(fromType)) {