clickhouse-mysql-data-reader icon indicating copy to clipboard operation
clickhouse-mysql-data-reader copied to clipboard

DB::Exception: Nested type Array(Int8) cannot be inside Nullable

Open sugengsuprayogi opened this issue 6 years ago • 1 comments

DB::Exception: Nested type Array(Int8) cannot be inside Nullable type. Stack trace: -> Nullable(Array(Int8))

MySQL : set('Senin','Selasa','Rabu','Kamis','Jum''at','Sabtu','Minggu') NULL Clickhouse : Array(Nullable(Int8))

sugengsuprayogi avatar May 28 '19 03:05 sugengsuprayogi

hi

@sunsingerus does mysql set have to be casted to clickhouse Array(Int8)? https://github.com/Islam93/clickhouse-mysql-data-reader/blob/master/docs/manual.md#set-types

looks like String type is more suitable and here we have string value in rows, not values index in set https://github.com/Islam93/clickhouse-mysql-data-reader/blob/3b1b7088751b05e5bbf45890c5949b58208c2343/clickhouse_mysql/writer/chwriter.py#L106

and an exception occurs CRITICAL:ex=Code: 53. Type mismatch in VALUES section. Expected Array(Int8) got <class 'str'>: S for column "field".

fu22ybear avatar Dec 15 '20 20:12 fu22ybear