Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
81ac6382
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
81ac6382
编写于
3月 13, 2021
作者:
A
Anton Popov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
slightly better performance
上级
6800e536
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
66 addition
and
42 deletion
+66
-42
src/AggregateFunctions/AggregateFunctionArgMinMax.h
src/AggregateFunctions/AggregateFunctionArgMinMax.h
+8
-4
src/AggregateFunctions/AggregateFunctionGroupArrayInsertAt.h
src/AggregateFunctions/AggregateFunctionGroupArrayInsertAt.h
+5
-3
src/AggregateFunctions/AggregateFunctionMinMaxAny.h
src/AggregateFunctions/AggregateFunctionMinMaxAny.h
+17
-15
src/AggregateFunctions/AggregateFunctionSumMap.h
src/AggregateFunctions/AggregateFunctionSumMap.h
+13
-6
src/DataStreams/NativeBlockInputStream.cpp
src/DataStreams/NativeBlockInputStream.cpp
+1
-1
src/DataTypes/Serializations/ISerialization.h
src/DataTypes/Serializations/ISerialization.h
+1
-1
src/DataTypes/Serializations/SerializationFixedString.cpp
src/DataTypes/Serializations/SerializationFixedString.cpp
+1
-1
src/DataTypes/Serializations/SerializationFixedString.h
src/DataTypes/Serializations/SerializationFixedString.h
+1
-1
src/Dictionaries/DictionaryStructure.cpp
src/Dictionaries/DictionaryStructure.cpp
+1
-0
src/Dictionaries/DictionaryStructure.h
src/Dictionaries/DictionaryStructure.h
+1
-0
src/Dictionaries/ExternalQueryBuilder.cpp
src/Dictionaries/ExternalQueryBuilder.cpp
+2
-2
src/Functions/FunctionsConversion.h
src/Functions/FunctionsConversion.h
+4
-2
src/Functions/array/arrayElement.cpp
src/Functions/array/arrayElement.cpp
+2
-0
src/Functions/runningConcurrency.cpp
src/Functions/runningConcurrency.cpp
+4
-2
src/Functions/visibleWidth.cpp
src/Functions/visibleWidth.cpp
+2
-1
src/Storages/MergeTree/MergeTreeIndexSet.cpp
src/Storages/MergeTree/MergeTreeIndexSet.cpp
+1
-1
src/Storages/MergeTree/MergeTreeReaderCompact.cpp
src/Storages/MergeTree/MergeTreeReaderCompact.cpp
+2
-2
未找到文件。
src/AggregateFunctions/AggregateFunctionArgMinMax.h
浏览文件 @
81ac6382
...
...
@@ -39,6 +39,8 @@ class AggregateFunctionArgMinMax final : public IAggregateFunctionTupleArgHelper
private:
const
DataTypePtr
&
type_res
;
const
DataTypePtr
&
type_val
;
const
SerializationPtr
serialization_res
;
const
SerializationPtr
serialization_val
;
bool
tuple_argument
;
using
Base
=
IAggregateFunctionTupleArgHelper
<
Data
,
AggregateFunctionArgMinMax
<
Data
>
,
2
>
;
...
...
@@ -48,6 +50,8 @@ public:
:
Base
({
type_res_
,
type_val_
},
{},
tuple_argument_
)
,
type_res
(
this
->
argument_types
[
0
])
,
type_val
(
this
->
argument_types
[
1
])
,
serialization_res
(
type_res
->
getDefaultSerialization
())
,
serialization_val
(
type_val
->
getDefaultSerialization
())
{
if
(
!
type_val
->
isComparable
())
throw
Exception
(
...
...
@@ -84,14 +88,14 @@ public:
void
serialize
(
ConstAggregateDataPtr
__restrict
place
,
WriteBuffer
&
buf
)
const
override
{
this
->
data
(
place
).
result
.
write
(
buf
,
*
type
_res
);
this
->
data
(
place
).
value
.
write
(
buf
,
*
type
_val
);
this
->
data
(
place
).
result
.
write
(
buf
,
*
serialization
_res
);
this
->
data
(
place
).
value
.
write
(
buf
,
*
serialization
_val
);
}
void
deserialize
(
AggregateDataPtr
__restrict
place
,
ReadBuffer
&
buf
,
Arena
*
arena
)
const
override
{
this
->
data
(
place
).
result
.
read
(
buf
,
*
type
_res
,
arena
);
this
->
data
(
place
).
value
.
read
(
buf
,
*
type
_val
,
arena
);
this
->
data
(
place
).
result
.
read
(
buf
,
*
serialization
_res
,
arena
);
this
->
data
(
place
).
value
.
read
(
buf
,
*
serialization
_val
,
arena
);
}
bool
allocatesMemoryInArena
()
const
override
{
return
Data
::
allocatesMemoryInArena
();
}
...
...
src/AggregateFunctions/AggregateFunctionGroupArrayInsertAt.h
浏览文件 @
81ac6382
...
...
@@ -55,7 +55,8 @@ class AggregateFunctionGroupArrayInsertAtGeneric final
:
public
IAggregateFunctionDataHelper
<
AggregateFunctionGroupArrayInsertAtDataGeneric
,
AggregateFunctionGroupArrayInsertAtGeneric
>
{
private:
DataTypePtr
&
type
;
DataTypePtr
type
;
SerializationPtr
serialization
;
Field
default_value
;
UInt64
length_to_resize
=
0
;
/// zero means - do not do resizing.
...
...
@@ -63,6 +64,7 @@ public:
AggregateFunctionGroupArrayInsertAtGeneric
(
const
DataTypes
&
arguments
,
const
Array
&
params
)
:
IAggregateFunctionDataHelper
<
AggregateFunctionGroupArrayInsertAtDataGeneric
,
AggregateFunctionGroupArrayInsertAtGeneric
>
(
arguments
,
params
)
,
type
(
argument_types
[
0
])
,
serialization
(
type
->
getDefaultSerialization
())
{
if
(
!
params
.
empty
())
{
...
...
@@ -154,7 +156,7 @@ public:
else
{
writeBinary
(
UInt8
(
0
),
buf
);
type
->
getDefaultSerialization
()
->
serializeBinary
(
elem
,
buf
);
serialization
->
serializeBinary
(
elem
,
buf
);
}
}
}
...
...
@@ -175,7 +177,7 @@ public:
UInt8
is_null
=
0
;
readBinary
(
is_null
,
buf
);
if
(
!
is_null
)
type
->
getDefaultSerialization
()
->
deserializeBinary
(
arr
[
i
],
buf
);
serialization
->
deserializeBinary
(
arr
[
i
],
buf
);
}
}
...
...
src/AggregateFunctions/AggregateFunctionMinMaxAny.h
浏览文件 @
81ac6382
...
...
@@ -50,14 +50,14 @@ public:
assert_cast
<
ColVecType
&>
(
to
).
insertDefault
();
}
void
write
(
WriteBuffer
&
buf
,
const
I
DataType
&
/*data_type
*/
)
const
void
write
(
WriteBuffer
&
buf
,
const
I
Serialization
&
/*serialization
*/
)
const
{
writeBinary
(
has
(),
buf
);
if
(
has
())
writeBinary
(
value
,
buf
);
}
void
read
(
ReadBuffer
&
buf
,
const
I
DataType
&
/*data_type
*/
,
Arena
*
)
void
read
(
ReadBuffer
&
buf
,
const
I
Serialization
&
/*serialization
*/
,
Arena
*
)
{
readBinary
(
has_value
,
buf
);
if
(
has
())
...
...
@@ -221,14 +221,14 @@ public:
assert_cast
<
ColumnString
&>
(
to
).
insertDefault
();
}
void
write
(
WriteBuffer
&
buf
,
const
I
DataType
&
/*data_type
*/
)
const
void
write
(
WriteBuffer
&
buf
,
const
I
Serialization
&
/*serialization
*/
)
const
{
writeBinary
(
size
,
buf
);
if
(
has
())
buf
.
write
(
getData
(),
size
);
}
void
read
(
ReadBuffer
&
buf
,
const
I
DataType
&
/*data_type
*/
,
Arena
*
arena
)
void
read
(
ReadBuffer
&
buf
,
const
I
Serialization
&
/*serialization
*/
,
Arena
*
arena
)
{
Int32
rhs_size
;
readBinary
(
rhs_size
,
buf
);
...
...
@@ -427,24 +427,24 @@ public:
to
.
insertDefault
();
}
void
write
(
WriteBuffer
&
buf
,
const
I
DataType
&
data_type
)
const
void
write
(
WriteBuffer
&
buf
,
const
I
Serialization
&
serialization
)
const
{
if
(
!
value
.
isNull
())
{
writeBinary
(
true
,
buf
);
data_type
.
getDefaultSerialization
()
->
serializeBinary
(
value
,
buf
);
serialization
.
serializeBinary
(
value
,
buf
);
}
else
writeBinary
(
false
,
buf
);
}
void
read
(
ReadBuffer
&
buf
,
const
I
DataType
&
data_type
,
Arena
*
)
void
read
(
ReadBuffer
&
buf
,
const
I
Serialization
&
serialization
,
Arena
*
)
{
bool
is_not_null
;
readBinary
(
is_not_null
,
buf
);
if
(
is_not_null
)
data_type
.
getDefaultSerialization
()
->
deserializeBinary
(
value
,
buf
);
serialization
.
deserializeBinary
(
value
,
buf
);
}
void
change
(
const
IColumn
&
column
,
size_t
row_num
,
Arena
*
)
...
...
@@ -678,15 +678,15 @@ struct AggregateFunctionAnyHeavyData : Data
return
false
;
}
void
write
(
WriteBuffer
&
buf
,
const
I
DataType
&
data_type
)
const
void
write
(
WriteBuffer
&
buf
,
const
I
Serialization
&
serialization
)
const
{
Data
::
write
(
buf
,
data_type
);
Data
::
write
(
buf
,
serialization
);
writeBinary
(
counter
,
buf
);
}
void
read
(
ReadBuffer
&
buf
,
const
I
DataType
&
data_type
,
Arena
*
arena
)
void
read
(
ReadBuffer
&
buf
,
const
I
Serialization
&
serialization
,
Arena
*
arena
)
{
Data
::
read
(
buf
,
data_type
,
arena
);
Data
::
read
(
buf
,
serialization
,
arena
);
readBinary
(
counter
,
buf
);
}
...
...
@@ -698,12 +698,14 @@ template <typename Data>
class
AggregateFunctionsSingleValue
final
:
public
IAggregateFunctionDataHelper
<
Data
,
AggregateFunctionsSingleValue
<
Data
>>
{
private:
DataTypePtr
&
type
;
DataTypePtr
type
;
SerializationPtr
serialization
;
public:
AggregateFunctionsSingleValue
(
const
DataTypePtr
&
type_
)
:
IAggregateFunctionDataHelper
<
Data
,
AggregateFunctionsSingleValue
<
Data
>>
({
type_
},
{})
,
type
(
this
->
argument_types
[
0
])
,
serialization
(
type
->
getDefaultSerialization
())
{
if
(
StringRef
(
Data
::
name
())
==
StringRef
(
"min"
)
||
StringRef
(
Data
::
name
())
==
StringRef
(
"max"
))
...
...
@@ -733,12 +735,12 @@ public:
void
serialize
(
ConstAggregateDataPtr
__restrict
place
,
WriteBuffer
&
buf
)
const
override
{
this
->
data
(
place
).
write
(
buf
,
*
type
.
get
()
);
this
->
data
(
place
).
write
(
buf
,
*
serialization
);
}
void
deserialize
(
AggregateDataPtr
__restrict
place
,
ReadBuffer
&
buf
,
Arena
*
arena
)
const
override
{
this
->
data
(
place
).
read
(
buf
,
*
type
.
get
()
,
arena
);
this
->
data
(
place
).
read
(
buf
,
*
serialization
,
arena
);
}
bool
allocatesMemoryInArena
()
const
override
...
...
src/AggregateFunctions/AggregateFunctionSumMap.h
浏览文件 @
81ac6382
...
...
@@ -64,7 +64,9 @@ class AggregateFunctionMapBase : public IAggregateFunctionDataHelper<
{
private:
DataTypePtr
keys_type
;
SerializationPtr
keys_serialization
;
DataTypes
values_types
;
Serializations
values_serializations
;
public:
using
Base
=
IAggregateFunctionDataHelper
<
...
...
@@ -72,9 +74,14 @@ public:
AggregateFunctionMapBase
(
const
DataTypePtr
&
keys_type_
,
const
DataTypes
&
values_types_
,
const
DataTypes
&
argument_types_
)
:
Base
(
argument_types_
,
{}
/* parameters */
),
keys_type
(
keys_type_
),
values_types
(
values_types_
)
:
Base
(
argument_types_
,
{}
/* parameters */
)
,
keys_type
(
keys_type_
)
,
keys_serialization
(
keys_type
->
getDefaultSerialization
())
,
values_types
(
values_types_
)
{
values_serializations
.
reserve
(
values_types
.
size
());
for
(
const
auto
&
type
:
values_types
)
values_serializations
.
emplace_back
(
type
->
getDefaultSerialization
());
}
DataTypePtr
getReturnType
()
const
override
...
...
@@ -248,9 +255,9 @@ public:
for
(
const
auto
&
elem
:
merged_maps
)
{
keys_
type
->
getDefaultSerialization
()
->
serializeBinary
(
elem
.
first
,
buf
);
keys_
serialization
->
serializeBinary
(
elem
.
first
,
buf
);
for
(
size_t
col
=
0
;
col
<
values_types
.
size
();
++
col
)
values_
types
[
col
]
->
getDefaultSerialization
()
->
serializeBinary
(
elem
.
second
[
col
],
buf
);
values_
serializations
[
col
]
->
serializeBinary
(
elem
.
second
[
col
],
buf
);
}
}
...
...
@@ -263,12 +270,12 @@ public:
for
(
size_t
i
=
0
;
i
<
size
;
++
i
)
{
Field
key
;
keys_
type
->
getDefaultSerialization
()
->
deserializeBinary
(
key
,
buf
);
keys_
serialization
->
deserializeBinary
(
key
,
buf
);
Array
values
;
values
.
resize
(
values_types
.
size
());
for
(
size_t
col
=
0
;
col
<
values_types
.
size
();
++
col
)
values_
types
[
col
]
->
getDefaultSerialization
()
->
deserializeBinary
(
values
[
col
],
buf
);
values_
serializations
[
col
]
->
deserializeBinary
(
values
[
col
],
buf
);
if
constexpr
(
IsDecimalNumber
<
T
>
)
merged_maps
[
key
.
get
<
DecimalField
<
T
>>
()]
=
values
;
...
...
src/DataStreams/NativeBlockInputStream.cpp
浏览文件 @
81ac6382
...
...
@@ -82,7 +82,7 @@ void NativeBlockInputStream::readData(const IDataType & type, ColumnPtr & column
auto
serialization
=
type
.
getDefaultSerialization
();
serialization
->
deserializeBinaryBulkStatePrefix
(
settings
,
state
);
serialization
->
deserializeBinaryBulkWithMultipleStreams
(
column
,
rows
,
settings
,
state
);
serialization
->
deserializeBinaryBulkWithMultipleStreams
(
column
,
rows
,
settings
,
state
,
nullptr
);
if
(
column
->
size
()
!=
rows
)
throw
Exception
(
"Cannot read all data in NativeBlockInputStream. Rows read: "
+
toString
(
column
->
size
())
+
". Rows expected: "
+
toString
(
rows
)
+
"."
,
...
...
src/DataTypes/Serializations/ISerialization.h
浏览文件 @
81ac6382
...
...
@@ -174,7 +174,7 @@ public:
size_t
limit
,
DeserializeBinaryBulkSettings
&
settings
,
DeserializeBinaryBulkStatePtr
&
state
,
SubstreamsCache
*
cache
=
nullptr
)
const
;
SubstreamsCache
*
cache
)
const
;
/** Override these methods for data types that require just single stream (most of data types).
*/
...
...
src/DataTypes/Serializations/SerializationFixedString.cpp
浏览文件 @
81ac6382
...
...
@@ -110,7 +110,7 @@ void SerializationFixedString::serializeTextEscaped(const IColumn & column, size
}
void
SerializationFixedString
::
alignStringLength
(
size_t
n
,
ColumnFixedString
::
Chars
&
data
,
size_t
string_start
)
void
SerializationFixedString
::
alignStringLength
(
size_t
n
,
PaddedPODArray
<
UInt8
>
&
data
,
size_t
string_start
)
{
size_t
length
=
data
.
size
()
-
string_start
;
if
(
length
<
n
)
...
...
src/DataTypes/Serializations/SerializationFixedString.h
浏览文件 @
81ac6382
...
...
@@ -44,7 +44,7 @@ public:
/// Makes sure that the length of a newly inserted string to `chars` is equal to getN().
/// If the length is less than getN() the function will add zero characters up to getN().
/// If the length is greater than getN() the function will throw an exception.
static
void
alignStringLength
(
size_t
n
,
PaddedPODArray
<
UInt8
>
&
chars
,
size_t
old_size
);
static
void
alignStringLength
(
size_t
n
,
PaddedPODArray
<
UInt8
>
&
data
,
size_t
string_start
);
};
}
src/Dictionaries/DictionaryStructure.cpp
浏览文件 @
81ac6382
...
...
@@ -439,6 +439,7 @@ std::vector<DictionaryAttribute> DictionaryStructure::getAttributes(
name
,
underlying_type
,
initial_type
,
initial_type
->
getDefaultSerialization
(),
type
,
expression
,
null_value
,
...
...
src/Dictionaries/DictionaryStructure.h
浏览文件 @
81ac6382
...
...
@@ -58,6 +58,7 @@ struct DictionaryAttribute final
const
std
::
string
name
;
const
AttributeUnderlyingType
underlying_type
;
const
DataTypePtr
type
;
const
SerializationPtr
serialization
;
const
DataTypePtr
nested_type
;
const
std
::
string
expression
;
const
Field
null_value
;
...
...
src/Dictionaries/ExternalQueryBuilder.cpp
浏览文件 @
81ac6382
...
...
@@ -358,7 +358,7 @@ void ExternalQueryBuilder::composeKeyCondition(const Columns & key_columns, cons
/// key_i=value_i
writeQuoted
(
key_description
.
name
,
out
);
writeString
(
"="
,
out
);
key_description
.
type
->
getDefaultSerialization
()
->
serializeTextQuoted
(
*
key_columns
[
i
],
row
,
out
,
format_settings
);
key_description
.
serialization
->
serializeTextQuoted
(
*
key_columns
[
i
],
row
,
out
,
format_settings
);
}
}
...
...
@@ -415,7 +415,7 @@ void ExternalQueryBuilder::composeKeyTuple(const Columns & key_columns, const si
writeString
(
", "
,
out
);
first
=
false
;
(
*
dict_struct
.
key
)[
i
].
type
->
getDefaultSerialization
()
->
serializeTextQuoted
(
*
key_columns
[
i
],
row
,
out
,
format_settings
);
(
*
dict_struct
.
key
)[
i
].
serialization
->
serializeTextQuoted
(
*
key_columns
[
i
],
row
,
out
,
format_settings
);
}
writeString
(
")"
,
out
);
...
...
src/Functions/FunctionsConversion.h
浏览文件 @
81ac6382
...
...
@@ -726,9 +726,10 @@ struct ConvertImplGenericToString
WriteBufferFromVector
<
ColumnString
::
Chars
>
write_buffer
(
data_to
);
FormatSettings
format_settings
;
auto
serialization
=
type
.
getDefaultSerialization
();
for
(
size_t
i
=
0
;
i
<
size
;
++
i
)
{
type
.
getDefaultSerialization
()
->
serializeText
(
col_from
,
i
,
write_buffer
,
format_settings
);
serialization
->
serializeText
(
col_from
,
i
,
write_buffer
,
format_settings
);
writeChar
(
0
,
write_buffer
);
offsets_to
[
i
]
=
write_buffer
.
count
();
}
...
...
@@ -1109,11 +1110,12 @@ struct ConvertImplGenericFromString
size_t
current_offset
=
0
;
FormatSettings
format_settings
;
auto
serialization
=
data_type_to
.
getDefaultSerialization
();
for
(
size_t
i
=
0
;
i
<
size
;
++
i
)
{
ReadBufferFromMemory
read_buffer
(
&
chars
[
current_offset
],
offsets
[
i
]
-
current_offset
-
1
);
data_type_to
.
getDefaultSerialization
()
->
deserializeWholeText
(
column_to
,
read_buffer
,
format_settings
);
serialization
->
deserializeWholeText
(
column_to
,
read_buffer
,
format_settings
);
if
(
!
read_buffer
.
eof
())
throwExceptionForIncompletelyParsedValue
(
read_buffer
,
result_type
);
...
...
src/Functions/array/arrayElement.cpp
浏览文件 @
81ac6382
...
...
@@ -868,6 +868,8 @@ bool FunctionArrayElement::matchKeyToIndexNumberConst(
const
IColumn
&
data
,
const
Offsets
&
offsets
,
const
Field
&
index
,
PaddedPODArray
<
UInt64
>
&
matched_idxs
)
{
std
::
cerr
<<
"index type: "
<<
index
.
getTypeName
()
<<
"
\n
"
;
std
::
cerr
<<
"index: "
<<
toString
(
index
)
<<
"
\n
"
;
const
auto
*
data_numeric
=
checkAndGetColumn
<
ColumnVector
<
DataType
>>
(
&
data
);
if
(
!
data_numeric
)
return
false
;
...
...
src/Functions/runningConcurrency.cpp
浏览文件 @
81ac6382
...
...
@@ -47,6 +47,8 @@ namespace DB
typename
ColVecConc
::
Container
&
vec_concurrency
=
col_concurrency
->
getData
();
std
::
multiset
<
typename
ArgDataType
::
FieldType
>
ongoing_until
;
auto
begin_serializaion
=
arguments
[
0
].
type
->
getDefaultSerialization
();
auto
end_serialization
=
arguments
[
1
].
type
->
getDefaultSerialization
();
for
(
size_t
i
=
0
;
i
<
input_rows_count
;
++
i
)
{
const
auto
begin
=
vec_begin
[
i
];
...
...
@@ -56,8 +58,8 @@ namespace DB
{
const
FormatSettings
default_format
;
WriteBufferFromOwnString
buf_begin
,
buf_end
;
arguments
[
0
].
type
->
getDefaultSerialization
()
->
serializeTextQuoted
(
*
(
arguments
[
0
].
column
),
i
,
buf_begin
,
default_format
);
arguments
[
1
].
type
->
getDefaultSerialization
()
->
serializeTextQuoted
(
*
(
arguments
[
1
].
column
),
i
,
buf_end
,
default_format
);
begin_serializaion
->
serializeTextQuoted
(
*
(
arguments
[
0
].
column
),
i
,
buf_begin
,
default_format
);
end_serialization
->
serializeTextQuoted
(
*
(
arguments
[
1
].
column
),
i
,
buf_end
,
default_format
);
throw
Exception
(
"Incorrect order of events: "
+
buf_begin
.
str
()
+
" > "
+
buf_end
.
str
(),
ErrorCodes
::
INCORRECT_DATA
);
...
...
src/Functions/visibleWidth.cpp
浏览文件 @
81ac6382
...
...
@@ -58,11 +58,12 @@ public:
String
tmp
;
FormatSettings
format_settings
;
auto
serialization
=
src
.
type
->
getDefaultSerialization
();
for
(
size_t
i
=
0
;
i
<
size
;
++
i
)
{
{
WriteBufferFromString
out
(
tmp
);
s
rc
.
type
->
getDefaultSerialization
()
->
serializeText
(
*
src
.
column
,
i
,
out
,
format_settings
);
s
erialization
->
serializeText
(
*
src
.
column
,
i
,
out
,
format_settings
);
}
res_data
[
i
]
=
UTF8
::
countCodePoints
(
reinterpret_cast
<
const
UInt8
*>
(
tmp
.
data
()),
tmp
.
size
());
...
...
src/Storages/MergeTree/MergeTreeIndexSet.cpp
浏览文件 @
81ac6382
...
...
@@ -107,7 +107,7 @@ void MergeTreeIndexGranuleSet::deserializeBinary(ReadBuffer & istr)
auto
serialization
=
type
->
getDefaultSerialization
();
serialization
->
deserializeBinaryBulkStatePrefix
(
settings
,
state
);
serialization
->
deserializeBinaryBulkWithMultipleStreams
(
new_column
,
rows_to_read
,
settings
,
state
);
serialization
->
deserializeBinaryBulkWithMultipleStreams
(
new_column
,
rows_to_read
,
settings
,
state
,
nullptr
);
block
.
insert
(
ColumnWithTypeAndName
(
new_column
,
type
,
column
.
name
));
}
...
...
src/Storages/MergeTree/MergeTreeReaderCompact.cpp
浏览文件 @
81ac6382
...
...
@@ -220,14 +220,14 @@ void MergeTreeReaderCompact::readData(
auto
serialization
=
type_in_storage
->
getDefaultSerialization
();
serialization
->
deserializeBinaryBulkStatePrefix
(
deserialize_settings
,
state
);
serialization
->
deserializeBinaryBulkWithMultipleStreams
(
temp_column
,
rows_to_read
,
deserialize_settings
,
state
);
serialization
->
deserializeBinaryBulkWithMultipleStreams
(
temp_column
,
rows_to_read
,
deserialize_settings
,
state
,
nullptr
);
column
=
type_in_storage
->
getSubcolumn
(
name_and_type
.
getSubcolumnName
(),
*
temp_column
);
}
else
{
auto
serialization
=
type
->
getDefaultSerialization
();
serialization
->
deserializeBinaryBulkStatePrefix
(
deserialize_settings
,
state
);
serialization
->
deserializeBinaryBulkWithMultipleStreams
(
column
,
rows_to_read
,
deserialize_settings
,
state
);
serialization
->
deserializeBinaryBulkWithMultipleStreams
(
column
,
rows_to_read
,
deserialize_settings
,
state
,
nullptr
);
}
/// The buffer is left in inconsistent state after reading single offsets
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录