smi2 / phpClickHouse

php ClickHouse wrapper
MIT License
741 stars 139 forks source link

Inserting a Map results in an error about expecting Map but got Array #226

Open that-guy-iain opened 1 month ago

that-guy-iain commented 1 month ago

I need to have a Map column. When I try to insert using this library I get

ClickHouseDB\Exception\DatabaseException:
Type mismatch in IN or VALUES section. Expected: Map(String, String). Got: Array: While executing ValuesBlockInputFormat. (TYPE_MISMATCH)
IN:INSERT INTO `events` (`event_id`,`customer_id`,`subscription_id`,`code`,`properties`,`value`,`created_at`)  VALUES  ('00f82d0485739c2ba49efbc4189a42bb','be7424e9-91d5-4ffc-82ec-a0be550462bf','18726c78-be3e-4d06-9ac6-071a9d4c9122',NULL,['value'],1,1724186847)