mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 04:22:03 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
44 lines
830 B
C++
44 lines
830 B
C++
#include <IO/WriteBufferFromString.h>
|
|
#include <IO/Operators.h>
|
|
#include <Columns/IColumn.h>
|
|
#include <Columns/ColumnNullable.h>
|
|
#include <Columns/ColumnConst.h>
|
|
#include <Core/Field.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
String IColumn::dumpStructure() const
|
|
{
|
|
WriteBufferFromOwnString res;
|
|
res << getFamilyName() << "(size = " << size();
|
|
|
|
ColumnCallback callback = [&](ColumnPtr & subcolumn)
|
|
{
|
|
res << ", " << subcolumn->dumpStructure();
|
|
};
|
|
|
|
const_cast<IColumn*>(this)->forEachSubcolumn(callback);
|
|
|
|
res << ")";
|
|
return res.str();
|
|
}
|
|
|
|
void IColumn::insertFrom(const IColumn & src, size_t n)
|
|
{
|
|
insert(src[n]);
|
|
}
|
|
|
|
bool isColumnNullable(const IColumn & column)
|
|
{
|
|
return checkColumn<ColumnNullable>(column);
|
|
}
|
|
|
|
bool isColumnConst(const IColumn & column)
|
|
{
|
|
return checkColumn<ColumnConst>(column);
|
|
}
|
|
|
|
}
|