Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
4b0645cb
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,发现更多精彩内容 >>
提交
4b0645cb
编写于
11月 13, 2018
作者:
A
Alexey Milovidov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed error in #3565
上级
c997f0b5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
80 addition
and
82 deletion
+80
-82
dbms/src/Dictionaries/CacheDictionary.cpp
dbms/src/Dictionaries/CacheDictionary.cpp
+30
-30
dbms/src/Dictionaries/ComplexKeyCacheDictionary_createAttributeWithType.cpp
...ies/ComplexKeyCacheDictionary_createAttributeWithType.cpp
+30
-30
dbms/src/Dictionaries/ComplexKeyHashedDictionary.cpp
dbms/src/Dictionaries/ComplexKeyHashedDictionary.cpp
+4
-4
dbms/src/Dictionaries/FlatDictionary.cpp
dbms/src/Dictionaries/FlatDictionary.cpp
+4
-6
dbms/src/Dictionaries/HashedDictionary.cpp
dbms/src/Dictionaries/HashedDictionary.cpp
+4
-4
dbms/src/Dictionaries/RangeHashedDictionary.cpp
dbms/src/Dictionaries/RangeHashedDictionary.cpp
+4
-4
dbms/src/Dictionaries/TrieDictionary.cpp
dbms/src/Dictionaries/TrieDictionary.cpp
+4
-4
未找到文件。
dbms/src/Dictionaries/CacheDictionary.cpp
浏览文件 @
4b0645cb
...
...
@@ -455,78 +455,78 @@ CacheDictionary::Attribute CacheDictionary::createAttributeWithType(const Attrib
switch
(
type
)
{
case
AttributeUnderlyingType
::
UInt8
:
std
::
get
<
UInt8
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt64
>
();
std
::
get
<
ContainerPtrType
<
UInt8
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt8
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt8
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt8
);
break
;
case
AttributeUnderlyingType
::
UInt16
:
std
::
get
<
UInt16
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt64
>
();
std
::
get
<
ContainerPtrType
<
UInt16
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt16
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt16
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt16
);
break
;
case
AttributeUnderlyingType
::
UInt32
:
std
::
get
<
UInt32
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt64
>
();
std
::
get
<
ContainerPtrType
<
UInt32
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt32
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt32
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt32
);
break
;
case
AttributeUnderlyingType
::
UInt64
:
std
::
get
<
UInt64
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt64
>
();
std
::
get
<
ContainerPtrType
<
UInt64
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt64
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt64
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt64
);
break
;
case
AttributeUnderlyingType
::
UInt128
:
std
::
get
<
UInt128
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt128
>
();
std
::
get
<
ContainerPtrType
<
UInt128
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt128
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt128
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt128
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt128
);
break
;
case
AttributeUnderlyingType
::
Int8
:
std
::
get
<
Int8
>
(
attr
.
null_values
)
=
null_value
.
get
<
Int64
>
();
std
::
get
<
ContainerPtrType
<
Int8
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Int8
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Int64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Int8
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Int8
);
break
;
case
AttributeUnderlyingType
::
Int16
:
std
::
get
<
Int16
>
(
attr
.
null_values
)
=
null_value
.
get
<
Int64
>
();
std
::
get
<
ContainerPtrType
<
Int16
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Int16
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Int64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Int16
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Int16
);
break
;
case
AttributeUnderlyingType
::
Int32
:
std
::
get
<
Int32
>
(
attr
.
null_values
)
=
null_value
.
get
<
Int64
>
();
std
::
get
<
ContainerPtrType
<
Int32
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Int32
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Int64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Int32
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Int32
);
break
;
case
AttributeUnderlyingType
::
Int64
:
std
::
get
<
Int64
>
(
attr
.
null_values
)
=
null_value
.
get
<
Int64
>
();
std
::
get
<
ContainerPtrType
<
Int64
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Int64
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Int64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Int64
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Int64
);
break
;
case
AttributeUnderlyingType
::
Decimal32
:
std
::
get
<
Decimal32
>
(
attr
.
null_values
)
=
null_value
.
get
<
Decimal32
>
();
std
::
get
<
ContainerPtrType
<
Decimal32
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Decimal32
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Decimal32
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Decimal32
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Decimal32
);
break
;
case
AttributeUnderlyingType
::
Decimal64
:
std
::
get
<
Decimal64
>
(
attr
.
null_values
)
=
null_value
.
get
<
Decimal64
>
();
std
::
get
<
ContainerPtrType
<
Decimal64
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Decimal64
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Decimal64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Decimal64
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Decimal64
);
break
;
case
AttributeUnderlyingType
::
Decimal128
:
std
::
get
<
Decimal128
>
(
attr
.
null_values
)
=
null_value
.
get
<
Decimal128
>
();
std
::
get
<
ContainerPtrType
<
Decimal128
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Decimal128
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Decimal128
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Decimal128
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Decimal128
);
break
;
case
AttributeUnderlyingType
::
Float32
:
std
::
get
<
Float32
>
(
attr
.
null_values
)
=
null_value
.
get
<
Float64
>
();
std
::
get
<
ContainerPtrType
<
Float32
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Float32
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Float64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Float32
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Float32
);
break
;
case
AttributeUnderlyingType
::
Float64
:
std
::
get
<
Float64
>
(
attr
.
null_values
)
=
null_value
.
get
<
Float64
>
();
std
::
get
<
ContainerPtrType
<
Float64
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Float64
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Float64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Float64
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Float64
);
break
;
case
AttributeUnderlyingType
::
String
:
std
::
get
<
String
>
(
attr
.
null_values
)
=
null_value
.
get
<
String
>
();
std
::
get
<
ContainerPtrType
<
StringRef
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
String
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
StringRef
);
if
(
!
string_arena
)
string_arena
=
std
::
make_unique
<
ArenaWithFreeLists
>
();
...
...
dbms/src/Dictionaries/ComplexKeyCacheDictionary_createAttributeWithType.cpp
浏览文件 @
4b0645cb
...
...
@@ -10,78 +10,78 @@ ComplexKeyCacheDictionary::Attribute ComplexKeyCacheDictionary::createAttributeW
switch
(
type
)
{
case
AttributeUnderlyingType
::
UInt8
:
std
::
get
<
UInt8
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt64
>
();
std
::
get
<
ContainerPtrType
<
UInt8
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt8
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt8
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt8
);
break
;
case
AttributeUnderlyingType
::
UInt16
:
std
::
get
<
UInt16
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt64
>
();
std
::
get
<
ContainerPtrType
<
UInt16
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt16
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt16
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt16
);
break
;
case
AttributeUnderlyingType
::
UInt32
:
std
::
get
<
UInt32
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt64
>
();
std
::
get
<
ContainerPtrType
<
UInt32
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt32
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt32
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt32
);
break
;
case
AttributeUnderlyingType
::
UInt64
:
std
::
get
<
UInt64
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt64
>
();
std
::
get
<
ContainerPtrType
<
UInt64
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt64
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt64
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt64
);
break
;
case
AttributeUnderlyingType
::
UInt128
:
std
::
get
<
UInt128
>
(
attr
.
null_values
)
=
null_value
.
get
<
UInt128
>
();
std
::
get
<
ContainerPtrType
<
UInt128
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
UInt128
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
UInt128
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
UInt128
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
UInt128
);
break
;
case
AttributeUnderlyingType
::
Int8
:
std
::
get
<
Int8
>
(
attr
.
null_values
)
=
null_value
.
get
<
Int64
>
();
std
::
get
<
ContainerPtrType
<
Int8
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Int8
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Int64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Int8
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Int8
);
break
;
case
AttributeUnderlyingType
::
Int16
:
std
::
get
<
Int16
>
(
attr
.
null_values
)
=
null_value
.
get
<
Int64
>
();
std
::
get
<
ContainerPtrType
<
Int16
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Int16
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Int64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Int16
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Int16
);
break
;
case
AttributeUnderlyingType
::
Int32
:
std
::
get
<
Int32
>
(
attr
.
null_values
)
=
null_value
.
get
<
Int64
>
();
std
::
get
<
ContainerPtrType
<
Int32
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Int32
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Int64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Int32
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Int32
);
break
;
case
AttributeUnderlyingType
::
Int64
:
std
::
get
<
Int64
>
(
attr
.
null_values
)
=
null_value
.
get
<
Int64
>
();
std
::
get
<
ContainerPtrType
<
Int64
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Int64
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Int64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Int64
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Int64
);
break
;
case
AttributeUnderlyingType
::
Float32
:
std
::
get
<
Float32
>
(
attr
.
null_values
)
=
null_value
.
get
<
Float64
>
();
std
::
get
<
ContainerPtrType
<
Float32
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Float32
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Float64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Float32
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Float32
);
break
;
case
AttributeUnderlyingType
::
Float64
:
std
::
get
<
Float64
>
(
attr
.
null_values
)
=
null_value
.
get
<
Float64
>
();
std
::
get
<
ContainerPtrType
<
Float64
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Float64
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Float64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Float64
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Float64
);
break
;
case
AttributeUnderlyingType
::
Decimal32
:
std
::
get
<
Decimal32
>
(
attr
.
null_values
)
=
null_value
.
get
<
Decimal32
>
();
std
::
get
<
ContainerPtrType
<
Decimal32
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Decimal32
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Decimal32
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Decimal32
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Decimal32
);
break
;
case
AttributeUnderlyingType
::
Decimal64
:
std
::
get
<
Decimal64
>
(
attr
.
null_values
)
=
null_value
.
get
<
Decimal64
>
();
std
::
get
<
ContainerPtrType
<
Decimal64
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Decimal64
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Decimal64
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Decimal64
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Decimal64
);
break
;
case
AttributeUnderlyingType
::
Decimal128
:
std
::
get
<
Decimal128
>
(
attr
.
null_values
)
=
null_value
.
get
<
Decimal128
>
();
std
::
get
<
ContainerPtrType
<
Decimal128
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
Decimal128
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
Decimal128
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
Decimal128
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
Decimal128
);
break
;
case
AttributeUnderlyingType
::
String
:
std
::
get
<
String
>
(
attr
.
null_values
)
=
null_value
.
get
<
String
>
();
std
::
get
<
ContainerPtrType
<
StringRef
>>
(
attr
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
(
size
);
attr
.
null_values
=
null_value
.
get
<
String
>
();
attr
.
arrays
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
(
size
);
bytes_allocated
+=
size
*
sizeof
(
StringRef
);
if
(
!
string_arena
)
string_arena
=
std
::
make_unique
<
ArenaWithFreeLists
>
();
...
...
dbms/src/Dictionaries/ComplexKeyHashedDictionary.cpp
浏览文件 @
4b0645cb
...
...
@@ -421,8 +421,8 @@ void ComplexKeyHashedDictionary::calculateBytesAllocated()
template
<
typename
T
>
void
ComplexKeyHashedDictionary
::
createAttributeImpl
(
Attribute
&
attribute
,
const
Field
&
null_value
)
{
std
::
get
<
T
>
(
attribute
.
null_values
)
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
std
::
get
<
ContainerPtrType
<
T
>>
(
attribute
.
maps
)
=
std
::
make_unique
<
ContainerType
<
T
>>
();
attribute
.
null_values
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
attribute
.
maps
=
std
::
make_unique
<
ContainerType
<
T
>>
();
}
ComplexKeyHashedDictionary
::
Attribute
ComplexKeyHashedDictionary
::
createAttributeWithType
(
const
AttributeUnderlyingType
type
,
const
Field
&
null_value
)
...
...
@@ -449,8 +449,8 @@ ComplexKeyHashedDictionary::Attribute ComplexKeyHashedDictionary::createAttribut
case
AttributeUnderlyingType
::
String
:
{
std
::
get
<
String
>
(
attr
.
null_values
)
=
null_value
.
get
<
String
>
();
std
::
get
<
ContainerPtrType
<
StringRef
>>
(
attr
.
maps
)
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
();
attr
.
null_values
=
null_value
.
get
<
String
>
();
attr
.
maps
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
();
attr
.
string_arena
=
std
::
make_unique
<
Arena
>
();
break
;
}
...
...
dbms/src/Dictionaries/FlatDictionary.cpp
浏览文件 @
4b0645cb
...
...
@@ -440,10 +440,9 @@ void FlatDictionary::calculateBytesAllocated()
template
<
typename
T
>
void
FlatDictionary
::
createAttributeImpl
(
Attribute
&
attribute
,
const
Field
&
null_value
)
{
const
auto
&
null_value_ref
=
std
::
get
<
T
>
(
attribute
.
null_values
)
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
std
::
get
<
ContainerPtrType
<
T
>>
(
attribute
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
T
>>
(
initial_array_size
,
null_value_ref
);
attribute
.
null_values
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
const
auto
&
null_value_ref
=
std
::
get
<
T
>
(
attribute
.
null_values
);
attribute
.
arrays
=
std
::
make_unique
<
ContainerType
<
T
>>
(
initial_array_size
,
null_value_ref
);
}
template
<
>
...
...
@@ -454,8 +453,7 @@ void FlatDictionary::createAttributeImpl<String>(Attribute & attribute, const Fi
const
String
&
string
=
null_value
.
get
<
typename
NearestFieldType
<
String
>::
Type
>
();
const
auto
string_in_arena
=
attribute
.
string_arena
->
insert
(
string
.
data
(),
string
.
size
());
null_value_ref
=
StringRef
{
string_in_arena
,
string
.
size
()};
std
::
get
<
ContainerPtrType
<
StringRef
>>
(
attribute
.
arrays
)
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
(
initial_array_size
,
null_value_ref
);
attribute
.
arrays
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
(
initial_array_size
,
null_value_ref
);
}
...
...
dbms/src/Dictionaries/HashedDictionary.cpp
浏览文件 @
4b0645cb
...
...
@@ -430,8 +430,8 @@ void HashedDictionary::calculateBytesAllocated()
template
<
typename
T
>
void
HashedDictionary
::
createAttributeImpl
(
Attribute
&
attribute
,
const
Field
&
null_value
)
{
std
::
get
<
T
>
(
attribute
.
null_values
)
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
std
::
get
<
CollectionPtrType
<
T
>>
(
attribute
.
maps
)
=
std
::
make_unique
<
CollectionType
<
T
>>
();
attribute
.
null_values
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
attribute
.
maps
=
std
::
make_unique
<
CollectionType
<
T
>>
();
}
HashedDictionary
::
Attribute
HashedDictionary
::
createAttributeWithType
(
const
AttributeUnderlyingType
type
,
const
Field
&
null_value
)
...
...
@@ -458,8 +458,8 @@ HashedDictionary::Attribute HashedDictionary::createAttributeWithType(const Attr
case
AttributeUnderlyingType
::
String
:
{
std
::
get
<
String
>
(
attr
.
null_values
)
=
null_value
.
get
<
String
>
();
std
::
get
<
CollectionPtrType
<
StringRef
>>
(
attr
.
maps
)
=
std
::
make_unique
<
CollectionType
<
StringRef
>>
();
attr
.
null_values
=
null_value
.
get
<
String
>
();
attr
.
maps
=
std
::
make_unique
<
CollectionType
<
StringRef
>>
();
attr
.
string_arena
=
std
::
make_unique
<
Arena
>
();
break
;
}
...
...
dbms/src/Dictionaries/RangeHashedDictionary.cpp
浏览文件 @
4b0645cb
...
...
@@ -261,8 +261,8 @@ void RangeHashedDictionary::calculateBytesAllocated()
template
<
typename
T
>
void
RangeHashedDictionary
::
createAttributeImpl
(
Attribute
&
attribute
,
const
Field
&
null_value
)
{
std
::
get
<
T
>
(
attribute
.
null_values
)
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
std
::
get
<
Ptr
<
T
>>
(
attribute
.
maps
)
=
std
::
make_unique
<
Collection
<
T
>>
();
attribute
.
null_values
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
attribute
.
maps
=
std
::
make_unique
<
Collection
<
T
>>
();
}
RangeHashedDictionary
::
Attribute
RangeHashedDictionary
::
createAttributeWithType
(
const
AttributeUnderlyingType
type
,
const
Field
&
null_value
)
...
...
@@ -289,8 +289,8 @@ RangeHashedDictionary::Attribute RangeHashedDictionary::createAttributeWithType(
case
AttributeUnderlyingType
::
String
:
{
std
::
get
<
String
>
(
attr
.
null_values
)
=
null_value
.
get
<
String
>
();
std
::
get
<
Ptr
<
StringRef
>>
(
attr
.
maps
)
=
std
::
make_unique
<
Collection
<
StringRef
>>
();
attr
.
null_values
=
null_value
.
get
<
String
>
();
attr
.
maps
=
std
::
make_unique
<
Collection
<
StringRef
>>
();
attr
.
string_arena
=
std
::
make_unique
<
Arena
>
();
break
;
}
...
...
dbms/src/Dictionaries/TrieDictionary.cpp
浏览文件 @
4b0645cb
...
...
@@ -352,8 +352,8 @@ void TrieDictionary::validateKeyTypes(const DataTypes & key_types) const
template
<
typename
T
>
void
TrieDictionary
::
createAttributeImpl
(
Attribute
&
attribute
,
const
Field
&
null_value
)
{
std
::
get
<
T
>
(
attribute
.
null_values
)
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
std
::
get
<
ContainerPtrType
<
T
>>
(
attribute
.
maps
)
=
std
::
make_unique
<
ContainerType
<
T
>>
();
attribute
.
null_values
=
null_value
.
get
<
typename
NearestFieldType
<
T
>::
Type
>
();
attribute
.
maps
=
std
::
make_unique
<
ContainerType
<
T
>>
();
}
TrieDictionary
::
Attribute
TrieDictionary
::
createAttributeWithType
(
const
AttributeUnderlyingType
type
,
const
Field
&
null_value
)
...
...
@@ -380,8 +380,8 @@ TrieDictionary::Attribute TrieDictionary::createAttributeWithType(const Attribut
case
AttributeUnderlyingType
::
String
:
{
std
::
get
<
String
>
(
attr
.
null_values
)
=
null_value
.
get
<
String
>
();
std
::
get
<
ContainerPtrType
<
StringRef
>>
(
attr
.
maps
)
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
();
attr
.
null_values
=
null_value
.
get
<
String
>
();
attr
.
maps
=
std
::
make_unique
<
ContainerType
<
StringRef
>>
();
attr
.
string_arena
=
std
::
make_unique
<
Arena
>
();
break
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录