2017-12-07 22:11:51 +00:00
|
|
|
#include <IO/WriteBufferFromString.h>
|
|
|
|
#include <IO/Operators.h>
|
|
|
|
#include <Columns/IColumn.h>
|
2019-07-01 11:44:19 +00:00
|
|
|
#include <Columns/ColumnNullable.h>
|
|
|
|
#include <Columns/ColumnConst.h>
|
2019-09-27 13:44:33 +00:00
|
|
|
#include <Core/Field.h>
|
2017-12-07 22:11:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2019-09-27 13:44:33 +00:00
|
|
|
void IColumn::insertFrom(const IColumn & src, size_t n)
|
|
|
|
{
|
|
|
|
insert(src[n]);
|
|
|
|
}
|
|
|
|
|
2019-07-01 11:44:19 +00:00
|
|
|
bool isColumnNullable(const IColumn & column)
|
|
|
|
{
|
|
|
|
return checkColumn<ColumnNullable>(column);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool isColumnConst(const IColumn & column)
|
|
|
|
{
|
|
|
|
return checkColumn<ColumnConst>(column);
|
|
|
|
}
|
|
|
|
|
2017-12-07 22:11:51 +00:00
|
|
|
}
|