Skip to content
Merged
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
9 changes: 9 additions & 0 deletions be/src/exec/schema_scanner/schema_columns_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@ std::string SchemaColumnsScanner::_to_mysql_data_type_string(TColumnDesc& desc)
case TPrimitiveType::JSONB: {
return "json";
}
case TPrimitiveType::MAP: {
return "map";
}
case TPrimitiveType::ARRAY: {
return "array";
}
case TPrimitiveType::STRUCT: {
return "struct";
}
default:
return "unknown";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ os char
set1 hll
set2 bitmap

-- !sql --
id int
c_array array

Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ os char
set1 hll
set2 bitmap

-- !sql --
id int
c_array array

Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,21 @@ suite("test_query_sys_data_type", 'query,p0') {
"""

qt_sql "select column_name, data_type from information_schema.columns where table_schema = '${dbName}' and table_name = '${tbName}'"

sql """ DROP TABLE IF EXISTS array_test """
sql """
CREATE TABLE `array_test` (
`id` int(11) NULL COMMENT "",
`c_array` ARRAY<int(11)> NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`id`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`id`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"in_memory" = "false",
"storage_format" = "V2"
)
"""
qt_sql "select column_name, data_type from information_schema.columns where table_schema = '${dbName}' and table_name = 'array_test'"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,21 @@ suite("test_query_sys_data_type", 'query,p0') {
"""

qt_sql "select column_name, data_type from information_schema.columns where table_schema = '${dbName}' and table_name = '${tbName}'"

sql """ DROP TABLE IF EXISTS array_test """
sql """
CREATE TABLE `array_test` (
`id` int(11) NULL COMMENT "",
`c_array` ARRAY<int(11)> NULL COMMENT ""
) ENGINE=OLAP
DUPLICATE KEY(`id`)
COMMENT "OLAP"
DISTRIBUTED BY HASH(`id`) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"in_memory" = "false",
"storage_format" = "V2"
)
"""
qt_sql "select column_name, data_type from information_schema.columns where table_schema = '${dbName}' and table_name = 'array_test'"
}