Skip to content
Open
Show file tree
Hide file tree
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 @@ -422,7 +422,7 @@ private Type dorisTypeToDoris(JdbcFieldSchema fieldSchema) {
return ScalarType.createDateV2Type();
case "DATETIME":
case "DATETIMEV2": {
int scale = (openParen == -1) ? 6
int scale = (openParen == -1) ? 0
: Integer.parseInt(upperType.substring(openParen + 1, upperType.length() - 1));
if (scale > 6) {
scale = 6;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public ShowResultSet doRun(ConnectContext ctx, StmtExecutor executor) throws Exc
continue;
}
final String columnName = col.getName();
final String columnType = col.getOriginType().toString().toLowerCase(Locale.ROOT);
final String columnType = col.getOriginType().hideVersionForVersionColumn(false);
final String isAllowNull = col.isAllowNull() ? "YES" : "NO";
final String isKey = col.isKey() ? "YES" : "NO";
final String defaultValue = col.getDefaultValue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
id int YES YES \N
name text YES NO \N NONE
score float YES NO \N NONE
event_date date YES NO \N NONE
event_time datetime YES NO \N NONE
decimal_col decimal(10,2) YES NO \N NONE

-- !cmd --
id int YES YES \N
name text YES NO \N NONE
score float YES NO \N NONE
event_date date YES NO \N NONE
event_time datetime YES NO \N NONE
decimal_col decimal(10,2) YES NO \N NONE

-- !cmd --
score float YES NO \N NONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ suite("test_show_columns_command", "nereids_p0") {
CREATE TABLE IF NOT EXISTS ${dbName}.${tableName} (
id INT,
name STRING,
score FLOAT
score FLOAT,
event_date DATE,
event_time DATETIME,
decimal_col DECIMAL(10, 2)
)
DISTRIBUTED BY HASH(id) BUCKETS 3
PROPERTIES ("replication_num" = "1");
Expand Down