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
12 changes: 12 additions & 0 deletions be/src/exec/schema_scanner/schema_columns_scanner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ std::string SchemaColumnsScanner::to_mysql_data_type_string(TColumnDesc& desc) {
case TPrimitiveType::DECIMALV2: {
return "decimal";
}
case TPrimitiveType::HLL: {
return "hll";
}
case TPrimitiveType::OBJECT: {
return "bitmap";
}
default:
return "unknown";
}
Expand Down Expand Up @@ -180,6 +186,12 @@ std::string SchemaColumnsScanner::type_to_string(TColumnDesc& desc) {
stream << ")";
return stream.str();
}
case TPrimitiveType::HLL: {
return "hll";
}
case TPrimitiveType::OBJECT: {
return "bitmap";
}
default:
return "unknown";
}
Expand Down
10 changes: 10 additions & 0 deletions regression-test/data/query/system/test_query_sys_data_type.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- This file is automatically generated. You should know what you did if you want to edit this
-- !sql --
dt date
id int
name char
province char
os char
set1 hll
set2 bitmap

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

suite("test_query_sys_data_type", 'query,p0') {
def tbName = "test_data_type"
def dbName = "test_query_db"
sql "CREATE DATABASE IF NOT EXISTS ${dbName}"
sql "USE ${dbName}"

sql """ DROP TABLE IF EXISTS ${tbName} """
sql """
create table ${tbName} (dt date, id int, name char(10), province char(10), os char(1), set1 hll hll_union, set2 bitmap bitmap_union)
distributed by hash(id) buckets 1 properties("replication_num"="1");
"""

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