public class SqlTypeExplicitPrecedenceList extends Object implements RelDataTypePrecedenceList
RelDataTypePrecedenceList interface via an explicit list of
SqlTypeName entries.| Modifier and Type | Field and Description |
|---|---|
private static List<SqlTypeName> |
COMPACT_NUMERIC_TYPES |
private static List<SqlTypeName> |
NUMERIC_TYPES |
private static Map<SqlTypeName,SqlTypeExplicitPrecedenceList> |
TYPE_NAME_TO_PRECEDENCE_LIST
Map from SqlTypeName to corresponding precedence list.
|
private List<SqlTypeName> |
typeNames |
| Constructor and Description |
|---|
SqlTypeExplicitPrecedenceList(Iterable<SqlTypeName> typeNames) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTypePrecedence(RelDataType type1,
RelDataType type2)
Compares the precedence of two types.
|
boolean |
containsType(RelDataType type)
Determines whether a type appears in this precedence list.
|
(package private) static RelDataTypePrecedenceList |
getListForType(RelDataType type) |
private static int |
getListPosition(SqlTypeName type,
List<SqlTypeName> list) |
private static SqlTypeExplicitPrecedenceList |
list(Iterable<SqlTypeName> typeNames) |
private static SqlTypeExplicitPrecedenceList |
list(SqlTypeName... typeNames) |
private static SqlTypeExplicitPrecedenceList |
numeric(SqlTypeName typeName) |
private static final List<SqlTypeName> NUMERIC_TYPES
private static final List<SqlTypeName> COMPACT_NUMERIC_TYPES
private static final Map<SqlTypeName,SqlTypeExplicitPrecedenceList> TYPE_NAME_TO_PRECEDENCE_LIST
SQL:2003 Part 2 Section 9.5private final List<SqlTypeName> typeNames
public SqlTypeExplicitPrecedenceList(Iterable<SqlTypeName> typeNames)
private static SqlTypeExplicitPrecedenceList list(SqlTypeName... typeNames)
private static SqlTypeExplicitPrecedenceList list(Iterable<SqlTypeName> typeNames)
private static SqlTypeExplicitPrecedenceList numeric(SqlTypeName typeName)
public boolean containsType(RelDataType type)
RelDataTypePrecedenceListcontainsType in interface RelDataTypePrecedenceListtype - type to checkpublic int compareTypePrecedence(RelDataType type1, RelDataType type2)
RelDataTypePrecedenceListThe list must contain both types.
compareTypePrecedence in interface RelDataTypePrecedenceListtype1 - first type to comparetype2 - second type to compareprivate static int getListPosition(SqlTypeName type, List<SqlTypeName> list)
static RelDataTypePrecedenceList getListForType(RelDataType type)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.