ClickHouse/tests/queries/0_stateless/02111_function_mapExtractKeyLike.reference
2021-10-28 17:15:32 +08:00

24 lines
567 B
Plaintext

The data of table:
1 {'P1-K1':'1-V1','P2-K2':'1-V2'}
2 {'P1-K1':'2-V1','P2-K2':'2-V2'}
3 {'P1-K1':'3-V1','P2-K2':'3-V2'}
4 {'P1-K1':'4-V1','P2-K2':'4-V2'}
5 {'5-K1':'5-V1','5-K2':'5-V2'}
6 {'P3-K1':'6-V1','P4-K2':'6-V2'}
The results of query: SELECT id, mapExtractKeyLike(map, \'P1%\') FROM map_extractKeyLike_test ORDER BY id;
1 {'P1-K1':'1-V1'}
2 {'P1-K1':'2-V1'}
3 {'P1-K1':'3-V1'}
4 {'P1-K1':'4-V1'}
5 {}
6 {}
The results of query: SELECT id, mapExtractKeyLike(map, \'5-K1\') FROM map_extractKeyLike_test ORDER BY id;
1 {}
2 {}
3 {}
4 {}
5 {'5-K1':'5-V1'}
6 {}