Package org.apache.flink.sql.parser.type
Class ExtendedSqlRowTypeNameSpec
- java.lang.Object
-
- org.apache.calcite.sql.SqlTypeNameSpec
-
- org.apache.flink.sql.parser.type.ExtendedSqlRowTypeNameSpec
-
public class ExtendedSqlRowTypeNameSpec extends org.apache.calcite.sql.SqlTypeNameSpecA sql type name specification of ROW type.The difference with
SqlRowTypeNameSpec:- Support comment syntax for every field
- Field data type default is nullable
- Support ROW type with empty fields, e.g. ROW()
-
-
Constructor Summary
Constructors Constructor Description ExtendedSqlRowTypeNameSpec(org.apache.calcite.sql.parser.SqlParserPos pos, List<org.apache.calcite.sql.SqlIdentifier> fieldNames, List<org.apache.calcite.sql.SqlDataTypeSpec> fieldTypes, List<org.apache.calcite.sql.SqlCharStringLiteral> comments, boolean unparseAsStandard)Creates a ROW type specification.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.calcite.rel.type.RelDataTypederiveType(org.apache.calcite.sql.validate.SqlValidator sqlValidator)booleanequalsDeep(org.apache.calcite.sql.SqlTypeNameSpec node, org.apache.calcite.util.Litmus litmus)List<org.apache.calcite.sql.SqlCharStringLiteral>getComments()List<org.apache.calcite.sql.SqlIdentifier>getFieldNames()List<org.apache.calcite.sql.SqlDataTypeSpec>getFieldTypes()voidunparse(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec)booleanunparseAsStandard()
-
-
-
Constructor Detail
-
ExtendedSqlRowTypeNameSpec
public ExtendedSqlRowTypeNameSpec(org.apache.calcite.sql.parser.SqlParserPos pos, List<org.apache.calcite.sql.SqlIdentifier> fieldNames, List<org.apache.calcite.sql.SqlDataTypeSpec> fieldTypes, List<org.apache.calcite.sql.SqlCharStringLiteral> comments, boolean unparseAsStandard)Creates a ROW type specification.- Parameters:
pos- parser positionfieldNames- field namesfieldTypes- field data typescomments- field commentsunparseAsStandard- whether to unparse as standard SQL style
-
-
Method Detail
-
getFieldNames
public List<org.apache.calcite.sql.SqlIdentifier> getFieldNames()
-
getFieldTypes
public List<org.apache.calcite.sql.SqlDataTypeSpec> getFieldTypes()
-
getComments
public List<org.apache.calcite.sql.SqlCharStringLiteral> getComments()
-
unparseAsStandard
public boolean unparseAsStandard()
-
unparse
public void unparse(org.apache.calcite.sql.SqlWriter writer, int leftPrec, int rightPrec)- Specified by:
unparsein classorg.apache.calcite.sql.SqlTypeNameSpec
-
equalsDeep
public boolean equalsDeep(org.apache.calcite.sql.SqlTypeNameSpec node, org.apache.calcite.util.Litmus litmus)- Specified by:
equalsDeepin classorg.apache.calcite.sql.SqlTypeNameSpec
-
deriveType
public org.apache.calcite.rel.type.RelDataType deriveType(org.apache.calcite.sql.validate.SqlValidator sqlValidator)
- Specified by:
deriveTypein classorg.apache.calcite.sql.SqlTypeNameSpec
-
-