public final class TNumericType extends TType
ARRAY_TYPE, BINARY_TYPE, BOOLEAN_TYPE, DATE_TYPE, NULL_TYPE, NUMERIC_TYPE, QUERY_PLAN_TYPE, STRING_TYPE| Constructor and Description |
|---|
TNumericType(int sql_type,
int size,
int scale)
Constructs a type with the given sql_type value, the size,
and the scale of the number.
|
| Modifier and Type | Method and Description |
|---|---|
int |
calculateApproximateMemoryUse(Object ob)
Calculates the approximate memory usage of an object of this type in
bytes.
|
boolean |
comparableTypes(TType type)
Returns true if the type of this object is logically comparable to the
type of the given object.
|
int |
compareObs(Object ob1,
Object ob2)
Compares two objects that are logically comparable under this
type.
|
int |
getScale()
Returns the scale of the number (-1 is don't care).
|
int |
getSize()
Returns the size of the number (-1 is don't care).
|
Class |
javaClass()
Returns the Java Class that is used to represent this type of object.
|
asEncodedString, asEncodedString, asSQLString, binaryType, booleanType, castObjectToTType, dateType, decodeString, decodeTypes, fromClass, getSQLType, getWidestType, javaObjectType, numericType, stringTypepublic TNumericType(int sql_type,
int size,
int scale)
public int getSize()
public int getScale()
public boolean comparableTypes(TType type)
TTypecomparableTypes in class TTypepublic int compareObs(Object ob1, Object ob2)
TTypecompareObs in class TTypepublic int calculateApproximateMemoryUse(Object ob)
TTypecalculateApproximateMemoryUse in class TTypeCopyright © 2019. All rights reserved.