Skip to content

Support multidimensional arrays #320

@SoftStoneDevelop

Description

@SoftStoneDevelop

https://clickhouse.com/docs/integrations/csharp#type-map-reading-other
In Clickhouse we can create column with type Array(Array(T)), Array(Array(Array(T)))... and so on.

Example:
Table:

CREATE TABLE IF NOT EXISTS gedaqtests.bytemarrayd2e1m
(
    m_id Int32,
    m_value Array(Array(UInt8)),
    mi_id Int32,
    mi_value Array(Array(UInt8))
)
ENGINE = MergeTree
PARTITION BY (intHash32(m_id) % 5)
ORDER BY m_id
SETTINGS index_granularity = 8192;

Query:

INSERT INTO gedaqtests.bytemarrayd2e1m(
    m_id,
    m_value,
    mi_id,
    mi_value
)
VALUES (
    {m_id:Int32},
    {m_value:Array(Array(UInt8))}, 
    {mi_id:Int32},
    {mi_value:Array(Array(UInt8))}
)

When i try to insert, i get error Cannot convert 219 to Array(UInt8).
I'm confused that the error says Array(UInt8) which doesn't match the table and parameter type.
This a bug in the parameter parser and it doesn't track array nesting?

If multidimensional arrays (byte[,], byte[,,]..) aren't currently supported, are there plans to add this support?
Will jagged arrays (byte[][], byte[][][]...) also be supported?

Metadata

Metadata

Labels

No labels
No labels
No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions