mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 13:02:00 +00:00
add test for parsing maps
This commit is contained in:
parent
d63a5e1c96
commit
1a607af429
@ -79,7 +79,7 @@ void DataTypeMap::assertKeyType() const
|
||||
std::string DataTypeMap::doGetName() const
|
||||
{
|
||||
WriteBufferFromOwnString s;
|
||||
s << "Map(" << key_type->getName() << "," << value_type->getName() << ")";
|
||||
s << "Map(" << key_type->getName() << ", " << value_type->getName() << ")";
|
||||
|
||||
return s.str();
|
||||
}
|
||||
|
@ -0,0 +1 @@
|
||||
{1:2,3:4,5:6,7:8} {'2021-05-20':1,'2021-05-21':2,'2021-05-22':3,'2021-05-23':4}
|
11
tests/queries/0_stateless/02002_parse_map_int_key.sql
Normal file
11
tests/queries/0_stateless/02002_parse_map_int_key.sql
Normal file
@ -0,0 +1,11 @@
|
||||
SET allow_experimental_map_type = 1;
|
||||
|
||||
DROP TABLE IF EXISTS t_map_int_key;
|
||||
CREATE TABLE t_map_int_key (m1 Map(UInt32, UInt32), m2 Map(Date, UInt32)) ENGINE = Memory;
|
||||
|
||||
INSERT INTO t_map_int_key FORMAT CSV "{1:2, 3: 4, 5 :6, 7 : 8}","{'2021-05-20':1, '2021-05-21': 2, '2021-05-22' :3, '2021-05-23' : 4}"
|
||||
;
|
||||
|
||||
SELECT m1, m2 FROM t_map_int_key;
|
||||
|
||||
DROP TABLE t_map_int_key;
|
Loading…
Reference in New Issue
Block a user