public abstract class SqlTypeNameSpec extends Object
SqlTypeNameSpec is a type name specification that allows user to
customize sql node unparsing and data type deriving.
To customize sql node unparsing, override the method
unparse(SqlWriter, int, int).
To customize data type deriving, override the method
deriveType(SqlValidator).
| Modifier | Constructor and Description |
|---|---|
protected |
SqlTypeNameSpec(SqlIdentifier name,
SqlParserPos pos)
Creates a
SqlTypeNameSpec. |
| Modifier and Type | Method and Description |
|---|---|
abstract RelDataType |
deriveType(SqlValidator validator)
Derive type from this SqlTypeNameSpec.
|
abstract boolean |
equalsDeep(SqlTypeNameSpec spec,
Litmus litmus)
Returns whether this spec is structurally equivalent to another spec.
|
SqlParserPos |
getParserPos() |
SqlIdentifier |
getTypeName() |
abstract void |
unparse(SqlWriter writer,
int leftPrec,
int rightPrec)
Writes a SQL representation of this spec to a writer.
|
protected SqlTypeNameSpec(SqlIdentifier name, SqlParserPos pos)
SqlTypeNameSpec.name - Name of the typepos - Parser position, must not be nullpublic abstract RelDataType deriveType(SqlValidator validator)
validator - The sql validatorRelDataType instance, throws exception if we could not
deduce the typepublic abstract void unparse(SqlWriter writer, int leftPrec, int rightPrec)
public abstract boolean equalsDeep(SqlTypeNameSpec spec, Litmus litmus)
public SqlParserPos getParserPos()
public SqlIdentifier getTypeName()
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.