| Modifier and Type | Method and Description |
|---|---|
static Object |
convert(Object value,
org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo typeInfo)
Attempts to convert the input value into the target type.
|
public static Object convert(Object value, org.apache.hadoop.hive.serde2.typeinfo.PrimitiveTypeInfo typeInfo)
null then null is
returned. If the input value is a String then an attempt is made to convert it into the target type. If the input
value is not a String then it is assumed the user has explicitly chosen the required type and no attempt is
made to perform a conversion. This may result in Hive throwing an error if the incorrect type was chosen.value - The input value.typeInfo - The target Table's column type.Copyright © 2013–2020. All rights reserved.