Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,6 @@ protected Type toPrestoType(int jdbcType, int columnSize)
case Types.CHAR:
case Types.NCHAR:
return createCharType(min(columnSize, CharType.MAX_LENGTH));
case Types.VARCHAR:
case Types.NVARCHAR:
case Types.LONGVARCHAR:
case Types.LONGNVARCHAR:
if (columnSize > VarcharType.MAX_LENGTH) {
return createUnboundedVarcharType();
}
return createVarcharType(columnSize);
case Types.BINARY:
case Types.VARBINARY:
case Types.LONGVARBINARY:
Expand All @@ -505,8 +497,16 @@ protected Type toPrestoType(int jdbcType, int columnSize)
return TIME;
case Types.TIMESTAMP:
return TIMESTAMP;
case Types.VARCHAR:
case Types.NVARCHAR:
case Types.LONGVARCHAR:
case Types.LONGNVARCHAR:
default:
if (columnSize > VarcharType.MAX_LENGTH) {
return createUnboundedVarcharType();
}
return createVarcharType(columnSize);
}
return null;
}

protected String toSqlType(Type type)
Expand Down