mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Added a test from @baloo-bear #5873
This commit is contained in:
parent
d40fb6b5d3
commit
2f06a7b4c1
@ -0,0 +1 @@
|
||||
['Hello','ProcessName'] ['World','node']
|
39
tests/queries/0_stateless/01264_nested_baloo_bear.sql
Normal file
39
tests/queries/0_stateless/01264_nested_baloo_bear.sql
Normal file
@ -0,0 +1,39 @@
|
||||
DROP TABLE IF EXISTS LOG_T;
|
||||
|
||||
CREATE TABLE LOG_T
|
||||
(
|
||||
`fingerprint` UInt64,
|
||||
`fields` Nested(
|
||||
name LowCardinality(String),
|
||||
value String)
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
ORDER BY fingerprint;
|
||||
|
||||
SELECT
|
||||
fields.name,
|
||||
fields.value
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
fields.name,
|
||||
fields.value
|
||||
FROM LOG_T
|
||||
)
|
||||
WHERE has(['node'], fields.value[indexOf(fields.name, 'ProcessName')]);
|
||||
|
||||
INSERT INTO LOG_T VALUES (123, ['Hello', 'ProcessName'], ['World', 'node']);
|
||||
|
||||
SELECT
|
||||
fields.name,
|
||||
fields.value
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
fields.name,
|
||||
fields.value
|
||||
FROM LOG_T
|
||||
)
|
||||
WHERE has(['node'], fields.value[indexOf(fields.name, 'ProcessName')]);
|
||||
|
||||
DROP TABLE LOG_T;
|
Loading…
Reference in New Issue
Block a user