mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
minor fixes
This commit is contained in:
parent
36ec379aeb
commit
063917786e
@ -676,6 +676,10 @@ void ColumnObject::addSubcolumn(const PathInData & key, MutableColumnPtr && subc
|
||||
|
||||
if (num_rows == 0)
|
||||
num_rows = new_size;
|
||||
else if (new_size != num_rows)
|
||||
throw Exception(ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH,
|
||||
"Size of subcolumn {} ({}) is inconsistent with column size ({})",
|
||||
key.getPath(), new_size, num_rows);
|
||||
}
|
||||
|
||||
void ColumnObject::addSubcolumn(const PathInData & key, size_t new_size)
|
||||
@ -686,6 +690,10 @@ void ColumnObject::addSubcolumn(const PathInData & key, size_t new_size)
|
||||
|
||||
if (num_rows == 0)
|
||||
num_rows = new_size;
|
||||
else if (new_size != num_rows)
|
||||
throw Exception(ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH,
|
||||
"Requiered size of subcolumn {} ({}) is inconsistent with column size ({})",
|
||||
key.getPath(), new_size, num_rows);
|
||||
}
|
||||
|
||||
void ColumnObject::addNestedSubcolumn(const PathInData & key, const FieldInfo & field_info, size_t new_size)
|
||||
|
@ -15,13 +15,12 @@ ColumnPtr tryGetColumnFromBlock(const Block & block, const NameAndTypePair & req
|
||||
if (!elem)
|
||||
return nullptr;
|
||||
|
||||
auto subcolumn_name = requested_column.getSubcolumnName();
|
||||
|
||||
DataTypePtr elem_type;
|
||||
ColumnPtr elem_column;
|
||||
|
||||
if (requested_column.isSubcolumn())
|
||||
{
|
||||
auto subcolumn_name = requested_column.getSubcolumnName();
|
||||
elem_type = elem->type->tryGetSubcolumnType(subcolumn_name);
|
||||
elem_column = elem->type->tryGetSubcolumn(subcolumn_name, elem->column);
|
||||
|
||||
|
@ -423,7 +423,8 @@ public:
|
||||
|
||||
bool mayBenefitFromIndexForIn(const ASTPtr & left_in_operand, ContextPtr, const StorageMetadataPtr & metadata_snapshot) const override;
|
||||
|
||||
/// Snapshot for MergeTree fixes the current set of data parts.
|
||||
/// Snapshot for MergeTree contains the current set of data parts
|
||||
/// at the moment of the start of query.
|
||||
struct SnapshotData : public StorageSnapshot::Data
|
||||
{
|
||||
DataPartsVector parts;
|
||||
|
@ -61,8 +61,9 @@ public:
|
||||
|
||||
bool isRemote() const override { return true; }
|
||||
|
||||
/// Snapshot for StorageDistributed fixes current descriptions
|
||||
/// of columns of type Object for each shard.
|
||||
/// Snapshot for StorageDistributed contains descriptions
|
||||
/// of columns of type Object for each shard at the moment
|
||||
/// of the start of query.
|
||||
struct SnapshotData : public StorageSnapshot::Data
|
||||
{
|
||||
ColumnsDescriptionByShardNum objects_by_shard;
|
||||
|
@ -29,7 +29,8 @@ public:
|
||||
|
||||
size_t getSize() const { return data.get()->size(); }
|
||||
|
||||
/// Snapshot for StorageMemory fixes current set of blocks.
|
||||
/// Snapshot for StorageMemory contains current set of blocks
|
||||
/// at the moment of the start of query.
|
||||
struct SnapshotData : public StorageSnapshot::Data
|
||||
{
|
||||
std::shared_ptr<const Blocks> blocks;
|
||||
|
@ -124,13 +124,7 @@ Block StorageSnapshot::getSampleBlockForColumns(const Names & column_names) cons
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
#if !defined(ARCADIA_BUILD)
|
||||
using DenseHashSet = google::dense_hash_set<StringRef, StringRefHash>;
|
||||
#else
|
||||
using DenseHashSet = google::sparsehash::dense_hash_set<StringRef, StringRefHash>;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void StorageSnapshot::check(const Names & column_names) const
|
||||
|
Loading…
Reference in New Issue
Block a user