mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Add const column test case for mapKeys and mapValues
This commit is contained in:
parent
6a78b10e0b
commit
143b84240e
@ -233,6 +233,8 @@ public:
|
||||
return std::make_shared<DataTypeArray>(key_type);
|
||||
}
|
||||
|
||||
bool useDefaultImplementationForConstants() const override { return true; }
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & /*result_type*/, size_t /*input_rows_count*/) const override
|
||||
{
|
||||
const ColumnMap * col_map = typeid_cast<const ColumnMap *>(arguments[0].column.get());
|
||||
@ -278,6 +280,8 @@ public:
|
||||
return std::make_shared<DataTypeArray>(value_type);
|
||||
}
|
||||
|
||||
bool useDefaultImplementationForConstants() const override { return true; }
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & /*result_type*/, size_t /*input_rows_count*/) const override
|
||||
{
|
||||
const ColumnMap * col_map = typeid_cast<const ColumnMap *>(arguments[0].column.get());
|
||||
|
@ -17,3 +17,4 @@
|
||||
[1000]
|
||||
[1001]
|
||||
[1002]
|
||||
{'aa':4,'44':5} ['aa','44'] [4,5]
|
||||
|
@ -20,3 +20,7 @@ select mapContains(b, 'aaa') from table_map; -- { serverError 43 }
|
||||
select mapKeys(a) from table_map;
|
||||
select mapValues(a) from table_map;
|
||||
drop table if exists table_map;
|
||||
|
||||
|
||||
-- Const column
|
||||
select map( 'aa', 4, '44' , 5) as c, mapKeys(c), mapValues(c);
|
||||
|
Loading…
Reference in New Issue
Block a user