public class CalciteUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CalciteUtils.CharType
A LogicalType corresponding to CHAR.
|
static class |
CalciteUtils.TimestampWithLocalTzType
A LogicalType corresponding to TIMESTAMP_WITH_LOCAL_TIME_ZONE.
|
static class |
CalciteUtils.TimeWithLocalTzType
A LogicalType corresponding to TIME_WITH_LOCAL_TIME_ZONE.
|
Modifier and Type | Field and Description |
---|---|
static Schema.FieldType |
BIG_INT |
static Schema.FieldType |
BOOLEAN |
static Schema.FieldType |
CHAR |
static Schema.FieldType |
DATE |
static Schema.FieldType |
DECIMAL |
static Schema.FieldType |
DOUBLE |
static Schema.FieldType |
FLOAT |
static Schema.FieldType |
INTEGER |
static Schema.FieldType |
NULLABLE_DATE |
static Schema.FieldType |
NULLABLE_TIME |
static Schema.FieldType |
NULLABLE_TIMESTAMP |
static Schema.FieldType |
SMALL_INT |
static Schema.FieldType |
TIME |
static Schema.FieldType |
TIME_WITH_LOCAL_TZ |
static Schema.FieldType |
TIMESTAMP |
static Schema.FieldType |
TIMESTAMP_WITH_LOCAL_TZ |
static Schema.FieldType |
TINY_INT |
static Schema.FieldType |
VARBINARY |
static Schema.FieldType |
VARCHAR |
Constructor and Description |
---|
CalciteUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isDateTimeType(Schema.FieldType fieldType)
Returns true if the type is any of the various date time types.
|
static boolean |
isStringType(Schema.FieldType fieldType) |
static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType |
sqlTypeWithAutoCast(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory,
java.lang.reflect.Type rawType)
SQL-Java type mapping, with specified Beam rules:
1. |
static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType |
toCalciteRowType(Schema schema,
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataTypeFactory dataTypeFactory)
Create an instance of
RelDataType so it can be used to create a table. |
static Schema.Field |
toField(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataTypeField calciteField) |
static Schema.Field |
toField(java.lang.String name,
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType calciteType) |
static Schema.FieldType |
toFieldType(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType calciteType) |
static Schema.FieldType |
toFieldType(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.type.SqlTypeName sqlTypeName) |
static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType |
toRelDataType(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataTypeFactory dataTypeFactory,
Schema.FieldType fieldType) |
static Schema |
toSchema(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType tableInfo)
Generate
Schema from RelDataType which is used to create table. |
static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.type.SqlTypeName |
toSqlTypeName(Schema.FieldType type) |
public static final Schema.FieldType TINY_INT
public static final Schema.FieldType SMALL_INT
public static final Schema.FieldType INTEGER
public static final Schema.FieldType BIG_INT
public static final Schema.FieldType FLOAT
public static final Schema.FieldType DOUBLE
public static final Schema.FieldType DECIMAL
public static final Schema.FieldType BOOLEAN
public static final Schema.FieldType VARBINARY
public static final Schema.FieldType VARCHAR
public static final Schema.FieldType CHAR
public static final Schema.FieldType DATE
public static final Schema.FieldType NULLABLE_DATE
public static final Schema.FieldType TIME
public static final Schema.FieldType NULLABLE_TIME
public static final Schema.FieldType TIME_WITH_LOCAL_TZ
public static final Schema.FieldType TIMESTAMP
public static final Schema.FieldType NULLABLE_TIMESTAMP
public static final Schema.FieldType TIMESTAMP_WITH_LOCAL_TZ
public static boolean isDateTimeType(Schema.FieldType fieldType)
public static boolean isStringType(Schema.FieldType fieldType)
public static Schema toSchema(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType tableInfo)
Schema
from RelDataType
which is used to create table.public static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.type.SqlTypeName toSqlTypeName(Schema.FieldType type)
public static Schema.FieldType toFieldType(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.type.SqlTypeName sqlTypeName)
public static Schema.Field toField(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataTypeField calciteField)
public static Schema.Field toField(java.lang.String name, org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType calciteType)
public static Schema.FieldType toFieldType(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType calciteType)
public static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType toCalciteRowType(Schema schema, org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataTypeFactory dataTypeFactory)
RelDataType
so it can be used to create a table.public static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType toRelDataType(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataTypeFactory dataTypeFactory, Schema.FieldType fieldType)
public static org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataType sqlTypeWithAutoCast(org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.rel.type.RelDataTypeFactory typeFactory, java.lang.reflect.Type rawType)
AbstractInstant
to Date
so Calcite can recognize it.rawType
-