Closed yuzhichang closed 2 years ago
Hi, I need to use Nested
(which seems very commonly used), so I wonder when will it be supported? If needed I can also contribute.
@fzyzcjy Nested
is actually Array(T)
. Both clickhouse-go and clickhouse_sinker support Array(T)
. For example,
CREATE TABLE test
(
`@time` DateTime,
`@item_guid` String,
`@metric_name` LowCardinality(String),
`@alg_name` LowCardinality(String),
`detail` Nested( is_p_item UInt8, sequency_id UInt16),
`upper` Array(Float64)
)
ENGINE = ReplacingMergeTree
PARTITION BY toYYYYMMDD(`@time`)
ORDER BY (`@time`, `@item_guid`, `@metric_name`)
SELECT
name,
type,
default_kind
FROM system.columns
WHERE table = 'test'
┌─name───────────────┬─type───────────────────┬─default_kind─┐
│ @time │ DateTime │ │
│ @item_guid │ String │ │
│ @metric_name │ LowCardinality(String) │ │
│ @alg_name │ LowCardinality(String) │ │
│ detail.is_p_item │ Array(UInt8) │ │
│ detail.sequency_id │ Array(UInt16) │ │
│ upper │ Array(Float64) │ │
└────────────────────┴────────────────────────┴──────────────┘
@yuzhichang Thanks!
Array from "csv" in csv - see segments below
publisherid, userid, segments 1,2032030,"[40,30,11]"
@josepowera master 090a1b0 added array support in csv parser.
master 60101302721919da9245295769a360c8bea88fce added Decimal support.
master 0a0199a added UUID
and Enum
support
ClickHouse and clickhouse-go support:
ClickHouse supports but clickhouse-go not:
There's UUID support in this fork.