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
Nested ClassesModifier and TypeClassDescriptionstatic classSynthetic record type.Nested classes/interfaces inherited from class org.apache.calcite.rel.type.RelDataTypeFactoryImpl
RelDataTypeFactoryImpl.JavaTypeNested 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
Constructors -
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 RelDataTypetoSql(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, enforceTypeWithNullability, leastRestrictiveMethods 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, useDoubleMultiplicationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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, enforceTypeWithNullability, getDefaultCharset, getTypeSystem, leastRestrictive, leastRestrictive, useDoubleMultiplication
-
Constructor Details
-
JavaTypeFactoryImpl
public JavaTypeFactoryImpl() -
JavaTypeFactoryImpl
-
-
Method Details
-
createStructType
Description copied from interface:JavaTypeFactoryCreates a record type based upon the public fields of a Java class.- Specified by:
createStructTypein interfaceJavaTypeFactory- Parameters:
type- Java class- Returns:
- Record type that remembers its Java class
-
createType
Description copied from interface:JavaTypeFactoryCreates a type, deducing whether a record, scalar or primitive type is needed.- Specified by:
createTypein interfaceJavaTypeFactory- Parameters:
type- Java type, such as aClass- Returns:
- Record or scalar type
-
getJavaClass
- Specified by:
getJavaClassin interfaceJavaTypeFactory
-
toSql
Description copied from interface:JavaTypeFactoryConverts a type in Java format to a SQL-oriented type.- Specified by:
toSqlin interfaceJavaTypeFactory
-
toSql
Converts a type in Java format to a SQL-oriented type. -
createSyntheticType
Description copied from interface:JavaTypeFactoryCreates a synthetic Java class whose fields have the given Java types.- Specified by:
createSyntheticTypein interfaceJavaTypeFactory
-