ClickHouse/src/DataTypes/ObjectUtils.h

26 lines
921 B
C++
Raw Normal View History

2021-04-23 23:56:26 +00:00
#pragma once
#include <Core/Block.h>
#include <Core/NamesAndTypes.h>
#include <Common/FieldVisitors.h>
2021-04-23 23:56:26 +00:00
namespace DB
{
using NameToTypeMap = std::unordered_map<String, DataTypePtr>;
size_t getNumberOfDimensions(const IDataType & type);
size_t getNumberOfDimensions(const IColumn & column);
DataTypePtr getBaseTypeOfArray(const DataTypePtr & type);
DataTypePtr createArrayOfType(DataTypePtr type, size_t dimension);
2021-04-23 23:56:26 +00:00
DataTypePtr getDataTypeByColumn(const IColumn & column);
void convertObjectsToTuples(NamesAndTypesList & columns_list, Block & block, const NamesAndTypesList & extended_storage_columns);
2021-04-24 04:09:01 +00:00
DataTypePtr getLeastCommonTypeForObject(const DataTypes & types);
NameSet getNamesOfObjectColumns(const NamesAndTypesList & columns_list);
2021-07-21 14:45:19 +00:00
void extendObjectColumns(NamesAndTypesList & columns_list, const NameToTypeMap & object_types, bool with_subcolumns);
void finalizeObjectColumns(MutableColumns & columns);
2021-04-23 23:56:26 +00:00
}