ClickHouse / clickhouse-cpp

C++ client library for ClickHouse
Apache License 2.0
306 stars 159 forks source link

ColumnArrayT Append will move container data if it is right value #345

Closed 1261385937 closed 1 year ago

1261385937 commented 1 year ago

Optimize ColumnArrayT::Append() to allow underlying column (e.g. ColumnString) to 'steal' values if it has r-value overload of Append() to prevent excessive copying.

1261385937 commented 1 year ago

Actually, we has 60+ column. Most of them are large string. we use this method:

void ColumnString::Append(std::string&& steal_value) 

rather than

void ColumnString::Append(std::string_view str)

So, ColumnArrayT Append can steal value is a better choice