Package org.apache.calcite.jdbc
Class JavaTypeFactoryImpl
java.lang.Object
org.apache.calcite.rel.type.RelDataTypeFactoryImpl
org.apache.calcite.sql.type.SqlTypeFactoryImpl
org.apache.calcite.jdbc.JavaTypeFactoryImpl
- All Implemented Interfaces:
JavaTypeFactory
,RelDataTypeFactory
- Direct Known Subclasses:
JavaTypeFactoryExtImpl
Implementation of
JavaTypeFactory
.
NOTE: This class is experimental and subject to change/removal without notice.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Synthetic record type.Nested classes/interfaces inherited from class org.apache.calcite.rel.type.RelDataTypeFactoryImpl
RelDataTypeFactoryImpl.JavaType
Nested classes/interfaces inherited from interface org.apache.calcite.rel.type.RelDataTypeFactory
RelDataTypeFactory.Builder, RelDataTypeFactory.FieldInfo, RelDataTypeFactory.FieldInfoBuilder
-
Field Summary
Fields inherited from class org.apache.calcite.rel.type.RelDataTypeFactoryImpl
typeSystem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateStructType
(Class type) Creates a record type based upon the public fields of a Java class.createSyntheticType
(List<Type> types) Creates a synthetic Java class whose fields have the given Java types.createType
(Type type) Creates a type, deducing whether a record, scalar or primitive type is needed.getJavaClass
(RelDataType type) toSql
(RelDataType type) Converts a type in Java format to a SQL-oriented type.static RelDataType
toSql
(RelDataTypeFactory typeFactory, RelDataType type) Converts a type in Java format to a SQL-oriented type.Methods inherited from class org.apache.calcite.sql.type.SqlTypeFactoryImpl
canonize, createArrayType, createFunctionSqlType, createMapType, createMeasureType, createMultisetType, createSqlIntervalType, createSqlType, createSqlType, createSqlType, createTypeWithCharsetAndCollation, createTypeWithNullability, createUnknownType, leastRestrictive
Methods inherited from class org.apache.calcite.rel.type.RelDataTypeFactoryImpl
builder, canonize, canonize, copyType, createDecimalProduct, createDecimalQuotient, createJavaType, createJoinType, createStructType, createStructType, createStructType, createStructType, decimalOf, getDefaultCharset, getTypeSystem, isJavaType, leastRestrictiveArrayMultisetType, leastRestrictiveIntervalDatetimeType, leastRestrictiveMapType, leastRestrictiveStructuredType, useDoubleMultiplication
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.calcite.rel.type.RelDataTypeFactory
builder, copyType, createArrayType, createDecimalProduct, createDecimalQuotient, createFunctionSqlType, createJavaType, createJoinType, createMapType, createMeasureType, createMultisetType, createSqlIntervalType, createSqlType, createSqlType, createSqlType, createStructType, createStructType, createStructType, createStructType, createTypeWithCharsetAndCollation, createTypeWithNullability, createUnknownType, decimalOf, getDefaultCharset, getTypeSystem, leastRestrictive, leastRestrictive, useDoubleMultiplication
-
Constructor Details
-
JavaTypeFactoryImpl
public JavaTypeFactoryImpl() -
JavaTypeFactoryImpl
-
-
Method Details
-
createStructType
Description copied from interface:JavaTypeFactory
Creates a record type based upon the public fields of a Java class.- Specified by:
createStructType
in interfaceJavaTypeFactory
- Parameters:
type
- Java class- Returns:
- Record type that remembers its Java class
-
createType
Description copied from interface:JavaTypeFactory
Creates a type, deducing whether a record, scalar or primitive type is needed.- Specified by:
createType
in interfaceJavaTypeFactory
- Parameters:
type
- Java type, such as aClass
- Returns:
- Record or scalar type
-
getJavaClass
- Specified by:
getJavaClass
in interfaceJavaTypeFactory
-
toSql
Description copied from interface:JavaTypeFactory
Converts a type in Java format to a SQL-oriented type.- Specified by:
toSql
in interfaceJavaTypeFactory
-
toSql
Converts a type in Java format to a SQL-oriented type. -
createSyntheticType
Description copied from interface:JavaTypeFactory
Creates a synthetic Java class whose fields have the given Java types.- Specified by:
createSyntheticType
in interfaceJavaTypeFactory
-