From 2d88cfa64208a4160682ca9a380dbc6f032b251e Mon Sep 17 00:00:00 2001 From: Vyacheslav Alipov Date: Mon, 5 Aug 2013 17:05:30 +0000 Subject: [PATCH] Merge --- .../DB/Storages/MergeTree/MergeTreeBlockInputStream.h | 8 +++++--- .../DB/Storages/MergeTree/MergeTreeBlockOutputStream.h | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dbms/include/DB/Storages/MergeTree/MergeTreeBlockInputStream.h b/dbms/include/DB/Storages/MergeTree/MergeTreeBlockInputStream.h index 34f0b31c964..26b81fdaa9c 100644 --- a/dbms/include/DB/Storages/MergeTree/MergeTreeBlockInputStream.h +++ b/dbms/include/DB/Storages/MergeTree/MergeTreeBlockInputStream.h @@ -302,7 +302,7 @@ private: void addStream(const String & name, const IDataType & type, size_t mark_number, size_t level = 0) { - String escaped_column_name = escapeForFileName(DataTypeNested::extractNestedTableName(name)); + String escaped_column_name = escapeForFileName(name); /** Если файла с данными нет - то не будем пытаться открыть его. * Это нужно, чтобы можно было добавлять новые столбцы к структуре таблицы без создания файлов для старых кусков. @@ -313,8 +313,10 @@ private: /// Для массивов используются отдельные потоки для размеров. if (const DataTypeArray * type_arr = dynamic_cast(&type)) { - String size_name = DataTypeNested::extractNestedTableName(name) + ARRAY_SIZES_COLUMN_NAME_SUFFIX + toString(level); - String escaped_size_name = escaped_column_name + ARRAY_SIZES_COLUMN_NAME_SUFFIX + toString(level); + String size_name = DataTypeNested::extractNestedTableName(name) + + ARRAY_SIZES_COLUMN_NAME_SUFFIX + toString(level); + String escaped_size_name = escapeForFileName(DataTypeNested::extractNestedTableName(name)) + + ARRAY_SIZES_COLUMN_NAME_SUFFIX + toString(level); streams.insert(std::make_pair(size_name, new Stream( path + escaped_size_name, diff --git a/dbms/include/DB/Storages/MergeTree/MergeTreeBlockOutputStream.h b/dbms/include/DB/Storages/MergeTree/MergeTreeBlockOutputStream.h index bf44ce64992..896191ccd45 100644 --- a/dbms/include/DB/Storages/MergeTree/MergeTreeBlockOutputStream.h +++ b/dbms/include/DB/Storages/MergeTree/MergeTreeBlockOutputStream.h @@ -182,14 +182,14 @@ private: void writeData(const String & path, const String & name, const IDataType & type, const IColumn & column, OffsetColumns & offset_columns, size_t level = 0) { - String escaped_column_name = escapeForFileName(DataTypeNested::extractNestedTableName(name)); + String escaped_column_name = escapeForFileName(name); size_t size = column.size(); /// Для массивов требуется сначала сериализовать размеры, а потом значения. if (const DataTypeArray * type_arr = dynamic_cast(&type)) { - String size_name = escaped_column_name + ARRAY_SIZES_COLUMN_NAME_SUFFIX + toString(level); - + String size_name = escapeForFileName(DataTypeNested::extractNestedTableName(name)) + + ARRAY_SIZES_COLUMN_NAME_SUFFIX + toString(level); if (offset_columns.count(size_name) == 0) { offset_columns.insert(size_name);