Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions core/src/main/java/org/apache/calcite/sql/type/BasicSqlType.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,20 @@ public BasicSqlType(RelDataTypeSystem typeSystem, SqlTypeName typeName,
int precision) {
this(typeSystem, typeName, false, precision, SCALE_NOT_SPECIFIED, null,
null);
}

/**
* Constructs a type with precision/length and nullability.
*
* @param typeSystem Type system
* @param typeName Type name
* @param isNullable Whether the type is nullable
* @param precision Precision (called length for some types)
*/
public BasicSqlType(RelDataTypeSystem typeSystem, SqlTypeName typeName,
boolean isNullable, int precision) {
this(typeSystem, typeName, isNullable, precision, SCALE_NOT_SPECIFIED,
null, null);
checkPrecScale(typeName, true, false);
}

Expand Down
Loading