ClickHouse/dbms/include/DB/Core/ColumnWithNameAndType.h
2011-10-31 06:37:12 +00:00

37 lines
580 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include <Poco/SharedPtr.h>
#include <DB/Columns/IColumn.h>
#include <DB/DataTypes/IDataType.h>
namespace DB
{
using Poco::SharedPtr;
/** Тип данных для представления столбца вместе с его типом и именем в оперативке.
*/
struct ColumnWithNameAndType
{
ColumnPtr column;
DataTypePtr type;
String name;
ColumnWithNameAndType cloneEmpty() const
{
ColumnWithNameAndType res;
res.name = name;
res.type = type;
if (column)
res.column = column->cloneEmpty();
return res;
}
};
}