You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it seems column data in block is got by index, rather than column name. so if dataframe's column order is not same as clickhouse table's column order, the data type can go wrong.
By now reindex dataframe's column order before insert is enough to solve this problem. I'm not sure if it is a design to improve insert performance, but at least this additional requirement should be documented
To Reproduce
use insert_dataframe() method to insert a dataframe who's column order is not same as clickhouse table's column order
Expected behavior
dataframe’s column and clickhouse table's column can be matched by name, rather than index
Versions
Version of package with the problem. = 0.2.1
Python version. = 3.8.9
The text was updated successfully, but these errors were encountered:
Describe the bug
In
BlockOutputStream
class, I found following code inwrite
method:it seems column data in block is got by index, rather than column name. so if dataframe's column order is not same as clickhouse table's column order, the data type can go wrong.
By now reindex dataframe's column order before insert is enough to solve this problem. I'm not sure if it is a design to improve insert performance, but at least this additional requirement should be documented
To Reproduce
use insert_dataframe() method to insert a dataframe who's column order is not same as clickhouse table's column order
Expected behavior
dataframe’s column and clickhouse table's column can be matched by name, rather than index
Versions
Version of package with the problem. = 0.2.1
Python version. = 3.8.9
The text was updated successfully, but these errors were encountered: