Open mtrimolet opened 2 years ago
Able to you add some test for null insert?
It seems the Map
type can't be a Nullable
by design (error below).
Query : CREATE TABLE ... rec3 Nullable(Map(String, UInt8))
[cut for clarity]
Result : Error: Nested type Map(String, UInt8) cannot be inside Nullable type. (ILLEGAL_TYPE_OF_ARGUMENT) (version 21.12.4.1 (official build))
As for the other way around, yes I can add this in the tests if you confirm that it's what you intended.
Query : CREATE TABLE ... rec3 Map(String, Nullable(UInt8))
[cut for clarity]
Row Data (JS) : { ... rec3: { a: null } ... }
[cut for clarity]
Result : OK
There's a point to be made about nested Map/Array
(see citation below), for which I expect this implementation to fail.
But maybe it should be issued separately as it concerns more general aspects of this lib.
From Map(key, value) | ClickHouse Docs :
Parameters
Any updates on this? Is there a solution that I can use for now?
There's a point to be made about nested
Map/Array
(see citation below), for which I expect this implementation to fail.
Actually it seems to work just fine.
Yep, I'm using a fork of your PR at the moment. I would appreciate it if this gets merged so I can switch over.
Inserting a value for a
Map
field can be done using a key-value format which is a kind of singlequoted JSON (see Map(key, value) | ClickHouse Docs.This is a proposal to use this feature from CH, enabling insertion for
Map
fields.