public class HiveDecimalUtils extends Object
Constructor and Description |
---|
HiveDecimalUtils() |
Modifier and Type | Method and Description |
---|---|
static HiveDecimal |
enforcePrecisionScale(HiveDecimal dec,
DecimalTypeInfo typeInfo) |
static HiveDecimalWritable |
enforcePrecisionScale(HiveDecimalWritable writable,
DecimalTypeInfo typeInfo) |
static TypeInfo |
getDecimalTypeForPrimitiveCategories(PrimitiveTypeInfo a,
PrimitiveTypeInfo b) |
static DecimalTypeInfo |
getDecimalTypeForPrimitiveCategory(PrimitiveTypeInfo a) |
static int |
getPrecisionForType(PrimitiveTypeInfo typeInfo)
Need to keep consistent with JdbcColumn.columnPrecision
|
static int |
getScaleForType(PrimitiveTypeInfo typeInfo)
Need to keep consistent with JdbcColumn.columnScale()
|
static void |
validateParameter(int precision,
int scale) |
public static HiveDecimal enforcePrecisionScale(HiveDecimal dec, DecimalTypeInfo typeInfo)
public static HiveDecimalWritable enforcePrecisionScale(HiveDecimalWritable writable, DecimalTypeInfo typeInfo)
public static void validateParameter(int precision, int scale)
public static int getPrecisionForType(PrimitiveTypeInfo typeInfo)
public static int getScaleForType(PrimitiveTypeInfo typeInfo)
public static TypeInfo getDecimalTypeForPrimitiveCategories(PrimitiveTypeInfo a, PrimitiveTypeInfo b)
public static DecimalTypeInfo getDecimalTypeForPrimitiveCategory(PrimitiveTypeInfo a)
Copyright © 2016 The Apache Software Foundation. All rights reserved.